mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Sync OpenBSD patchset 698:
Catch SIGHUP and terminate if running as a client. This prevents clients from being left hanging around when, for example, a SSH session is disconnected. ok nicm@
This commit is contained in:
		
							
								
								
									
										7
									
								
								client.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								client.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: client.c,v 1.91 2010-05-14 14:30:00 tcunha Exp $ */
 | 
			
		||||
/* $Id: client.c,v 1.92 2010-05-14 14:35:26 tcunha Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -210,6 +210,11 @@ client_signal(int sig, unused short events, unused void *data)
 | 
			
		||||
	struct sigaction	sigact;
 | 
			
		||||
 | 
			
		||||
	switch (sig) {
 | 
			
		||||
	case SIGHUP:
 | 
			
		||||
		client_exitmsg = "lost tty";
 | 
			
		||||
		client_exitval = 1;
 | 
			
		||||
		client_write_server(MSG_EXITING, NULL, 0);
 | 
			
		||||
		break;
 | 
			
		||||
	case SIGTERM:
 | 
			
		||||
		client_exitmsg = "terminated";
 | 
			
		||||
		client_exitval = 1;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user