mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		
							
								
								
									
										17
									
								
								client.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								client.c
									
									
									
									
									
								
							@@ -533,11 +533,22 @@ client_signal(int sig)
 | 
			
		||||
{
 | 
			
		||||
	struct sigaction sigact;
 | 
			
		||||
	int		 status;
 | 
			
		||||
	pid_t		 pid;
 | 
			
		||||
 | 
			
		||||
	log_debug("%s: %s", __func__, strsignal(sig));
 | 
			
		||||
	if (sig == SIGCHLD)
 | 
			
		||||
		waitpid(WAIT_ANY, &status, WNOHANG);
 | 
			
		||||
	else if (!client_attached) {
 | 
			
		||||
	if (sig == SIGCHLD) {
 | 
			
		||||
		for (;;) {
 | 
			
		||||
			pid = waitpid(WAIT_ANY, &status, WNOHANG);
 | 
			
		||||
			if (pid == 0)
 | 
			
		||||
				break;
 | 
			
		||||
			if (pid == -1) {
 | 
			
		||||
				if (errno == ECHILD)
 | 
			
		||||
					break;
 | 
			
		||||
				log_debug("waitpid failed: %s",
 | 
			
		||||
				    strerror(errno));
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	} else if (!client_attached) {
 | 
			
		||||
		if (sig == SIGTERM || sig == SIGHUP)
 | 
			
		||||
			proc_exit(client_proc);
 | 
			
		||||
	} else {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user