mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:17:31 +00:00 
			
		
		
		
	Initialise socket_path before parsing configuration file.
This commit is contained in:
		
							
								
								
									
										7
									
								
								server.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								server.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: server.c,v 1.124 2009-02-21 17:52:25 nicm Exp $ */
 | 
			
		||||
/* $Id: server.c,v 1.125 2009-03-04 17:33:30 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -163,6 +163,9 @@ server_start(const char *path)
 | 
			
		||||
	server_password = NULL;
 | 
			
		||||
	server_activity = time(NULL);
 | 
			
		||||
 | 
			
		||||
	start_time = time(NULL);
 | 
			
		||||
	socket_path = path;
 | 
			
		||||
 | 
			
		||||
	if (cfg_file != NULL && load_cfg(cfg_file, &cause) != 0) {
 | 
			
		||||
		log_warnx("%s", cause);
 | 
			
		||||
		exit(1);
 | 
			
		||||
@@ -173,8 +176,6 @@ server_start(const char *path)
 | 
			
		||||
	setproctitle("server (%s)", path);
 | 
			
		||||
#endif
 | 
			
		||||
	log_debug("server started, pid %ld", (long) getpid());
 | 
			
		||||
	start_time = time(NULL);
 | 
			
		||||
	socket_path = path;
 | 
			
		||||
	
 | 
			
		||||
	memset(&sa, 0, sizeof sa);
 | 
			
		||||
	sa.sun_family = AF_UNIX;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user