mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
Conflicts: Makefile cmd-list-commands.c cmd-suspend-client.c job.c tmux.h xmalloc.c
This commit is contained in:
		
							
								
								
									
										13
									
								
								client.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								client.c
									
									
									
									
									
								
							@@ -26,6 +26,7 @@
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <event.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
#include <signal.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
@@ -437,15 +438,11 @@ client_signal(int sig, unused short events, unused void *data)
 | 
			
		||||
	struct sigaction sigact;
 | 
			
		||||
	int		 status;
 | 
			
		||||
 | 
			
		||||
	if (!client_attached) {
 | 
			
		||||
		switch (sig) {
 | 
			
		||||
		case SIGCHLD:
 | 
			
		||||
			waitpid(WAIT_ANY, &status, WNOHANG);
 | 
			
		||||
			break;
 | 
			
		||||
		case SIGTERM:
 | 
			
		||||
	if (sig == SIGCHLD)
 | 
			
		||||
		waitpid(WAIT_ANY, &status, WNOHANG);
 | 
			
		||||
	else if (!client_attached) {
 | 
			
		||||
		if (sig == SIGTERM)
 | 
			
		||||
			event_loopexit(NULL);
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		switch (sig) {
 | 
			
		||||
		case SIGHUP:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user