mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:17:31 +00:00 
			
		
		
		
	Improve logging of the environment etc for new panes.
This commit is contained in:
		
							
								
								
									
										9
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								window.c
									
									
									
									
									
								
							@@ -917,10 +917,11 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv,
 | 
			
		||||
	wp->flags &= ~(PANE_STATUSREADY|PANE_STATUSDRAWN);
 | 
			
		||||
 | 
			
		||||
	cmd = cmd_stringify_argv(wp->argc, wp->argv);
 | 
			
		||||
	log_debug("spawn: %s -- %s", wp->shell, cmd);
 | 
			
		||||
	log_debug("%s: shell=%s", __func__, wp->shell);
 | 
			
		||||
	log_debug("%s: command=%s", __func__, cmd);
 | 
			
		||||
	for (i = 0; i < wp->argc; i++)
 | 
			
		||||
		log_debug("spawn: argv[%d] = %s", i, wp->argv[i]);
 | 
			
		||||
	environ_log(env, "spawn: ");
 | 
			
		||||
		log_debug("%s: argv[%d]=%s", __func__, i, wp->argv[i]);
 | 
			
		||||
	environ_log(env, "%s: environment ", __func__);
 | 
			
		||||
 | 
			
		||||
	memset(&ws, 0, sizeof ws);
 | 
			
		||||
	ws.ws_col = screen_size_x(&wp->base);
 | 
			
		||||
@@ -998,6 +999,8 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv,
 | 
			
		||||
		execl(wp->shell, argv0, (char *)NULL);
 | 
			
		||||
		fatal("execl failed");
 | 
			
		||||
	}
 | 
			
		||||
	log_debug("%s: master=%s", __func__, ttyname(wp->fd));
 | 
			
		||||
	log_debug("%s: slave=%s", __func__, wp->tty);
 | 
			
		||||
 | 
			
		||||
	sigprocmask(SIG_SETMASK, &oldset, NULL);
 | 
			
		||||
	setblocking(wp->fd, 0);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user