mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Make environ_set va_args and use it to tidy up some calls. Also add a
missing word in manpage (from jmc).
This commit is contained in:
		
							
								
								
									
										11
									
								
								server-fn.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								server-fn.c
									
									
									
									
									
								
							@@ -34,20 +34,19 @@ void		server_callback_identify(int, short, void *);
 | 
			
		||||
void
 | 
			
		||||
server_fill_environ(struct session *s, struct environ *env)
 | 
			
		||||
{
 | 
			
		||||
	char	var[PATH_MAX], *term;
 | 
			
		||||
	u_int	idx;
 | 
			
		||||
	long	pid;
 | 
			
		||||
	char	*term;
 | 
			
		||||
	u_int	 idx;
 | 
			
		||||
	long	 pid;
 | 
			
		||||
 | 
			
		||||
	if (s != NULL) {
 | 
			
		||||
		term = options_get_string(global_options, "default-terminal");
 | 
			
		||||
		environ_set(env, "TERM", term);
 | 
			
		||||
		environ_set(env, "TERM", "%s", term);
 | 
			
		||||
 | 
			
		||||
		idx = s->id;
 | 
			
		||||
	} else
 | 
			
		||||
		idx = (u_int)-1;
 | 
			
		||||
	pid = getpid();
 | 
			
		||||
	xsnprintf(var, sizeof var, "%s,%ld,%u", socket_path, pid, idx);
 | 
			
		||||
	environ_set(env, "TMUX", var);
 | 
			
		||||
	environ_set(env, "TMUX", "%s,%ld,%u", socket_path, pid, idx);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user