mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Simplify logging and just fprintf(stderr, ...) for early errors.
This commit is contained in:
		
							
								
								
									
										6
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								tmux.c
									
									
									
									
									
								
							@@ -73,7 +73,7 @@ logfile(const char *name)
 | 
			
		||||
	log_close();
 | 
			
		||||
	if (debug_level > 0) {
 | 
			
		||||
		xasprintf(&path, "tmux-%s-%ld.log", name, (long) getpid());
 | 
			
		||||
		log_open_file(debug_level, path);
 | 
			
		||||
		log_open(debug_level, path);
 | 
			
		||||
		xfree(path);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -294,8 +294,6 @@ main(int argc, char **argv)
 | 
			
		||||
	if (shell_cmd != NULL && argc != 0)
 | 
			
		||||
		usage();
 | 
			
		||||
 | 
			
		||||
	log_open_tty(debug_level);
 | 
			
		||||
 | 
			
		||||
	if (!(flags & IDENTIFY_UTF8)) {
 | 
			
		||||
		/*
 | 
			
		||||
		 * If the user has set whichever of LC_ALL, LC_CTYPE or LANG
 | 
			
		||||
@@ -379,7 +377,7 @@ main(int argc, char **argv)
 | 
			
		||||
		/* -L or default set. */
 | 
			
		||||
		if (label != NULL) {
 | 
			
		||||
			if ((path = makesocketpath(label)) == NULL) {
 | 
			
		||||
				log_warn("can't create socket");
 | 
			
		||||
				fprintf(stderr, "can't create socket\n");
 | 
			
		||||
				exit(1);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user