mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	#187 cleanup zombies properly using default
This commit is contained in:
		
							parent
							
								
									3ca1fa7844
								
							
						
					
					
						commit
						5539fd89be
					
				
					 1 changed files with 2 additions and 9 deletions
				
			
		
							
								
								
									
										11
									
								
								sway/main.c
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								sway/main.c
									
										
									
									
									
								
							| 
						 | 
					@ -22,8 +22,6 @@ void sway_terminate(void) {
 | 
				
			||||||
	wlc_terminate();
 | 
						wlc_terminate();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void sigchld_handle(int signal);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void wlc_log_handler(enum wlc_log_type type, const char *str) {
 | 
					static void wlc_log_handler(enum wlc_log_type type, const char *str) {
 | 
				
			||||||
	if (type == WLC_LOG_ERROR) {
 | 
						if (type == WLC_LOG_ERROR) {
 | 
				
			||||||
		sway_log(L_ERROR, "[wlc] %s", str);
 | 
							sway_log(L_ERROR, "[wlc] %s", str);
 | 
				
			||||||
| 
						 | 
					@ -64,8 +62,8 @@ int main(int argc, char **argv) {
 | 
				
			||||||
		{0, 0, 0, 0}
 | 
							{0, 0, 0, 0}
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Signal handling */
 | 
						/* clean zombie processes */
 | 
				
			||||||
	signal(SIGCHLD, sigchld_handle);
 | 
						signal(SIGCHLD, SIG_IGN);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	setenv("WLC_DIM", "0", 0);
 | 
						setenv("WLC_DIM", "0", 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -152,8 +150,3 @@ int main(int argc, char **argv) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
void sigchld_handle(int signal) {
 | 
					 | 
				
			||||||
	(void) signal;
 | 
					 | 
				
			||||||
	while (waitpid((pid_t)-1, 0, WNOHANG) > 0);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue