mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge IDENTIFY_* flags with CLIENT_* flags.
This commit is contained in:
		
							
								
								
									
										16
									
								
								client.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								client.c
									
									
									
									
									
								
							@@ -236,7 +236,7 @@ client_main(int argc, char **argv, int flags)
 | 
			
		||||
	setblocking(STDIN_FILENO, 0);
 | 
			
		||||
	event_set(&client_stdin, STDIN_FILENO, EV_READ|EV_PERSIST,
 | 
			
		||||
	    client_stdin_callback, NULL);
 | 
			
		||||
	if (flags & IDENTIFY_TERMIOS) {
 | 
			
		||||
	if (flags & CLIENT_CONTROLCONTROL) {
 | 
			
		||||
		if (tcgetattr(STDIN_FILENO, &saved_tio) != 0) {
 | 
			
		||||
			fprintf(stderr, "tcgetattr failed: %s\n",
 | 
			
		||||
			    strerror(errno));
 | 
			
		||||
@@ -293,14 +293,12 @@ client_main(int argc, char **argv, int flags)
 | 
			
		||||
		ppid = getppid();
 | 
			
		||||
		if (client_exittype == MSG_DETACHKILL && ppid > 1)
 | 
			
		||||
			kill(ppid, SIGHUP);
 | 
			
		||||
	} else if (flags & IDENTIFY_TERMIOS) {
 | 
			
		||||
		if (flags & IDENTIFY_CONTROL) {
 | 
			
		||||
			if (client_exitreason != CLIENT_EXIT_NONE)
 | 
			
		||||
			    printf("%%exit %s\n", client_exit_message());
 | 
			
		||||
			else
 | 
			
		||||
			    printf("%%exit\n");
 | 
			
		||||
			printf("\033\\");
 | 
			
		||||
		}
 | 
			
		||||
	} else if (flags & CLIENT_CONTROLCONTROL) {
 | 
			
		||||
		if (client_exitreason != CLIENT_EXIT_NONE)
 | 
			
		||||
			printf("%%exit %s\n", client_exit_message());
 | 
			
		||||
		else
 | 
			
		||||
			printf("%%exit\n");
 | 
			
		||||
		printf("\033\\");
 | 
			
		||||
		tcsetattr(STDOUT_FILENO, TCSAFLUSH, &saved_tio);
 | 
			
		||||
	}
 | 
			
		||||
	setblocking(STDIN_FILENO, 1);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user