mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
Conflicts: tmux.c
This commit is contained in:
		
							
								
								
									
										19
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								tmux.c
									
									
									
									
									
								
							@@ -22,6 +22,8 @@
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <event.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
#include <locale.h>
 | 
			
		||||
#include <paths.h>
 | 
			
		||||
#include <pwd.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
@@ -167,10 +169,12 @@ makesocketpath(const char *label)
 | 
			
		||||
	u_int		uid;
 | 
			
		||||
 | 
			
		||||
	uid = getuid();
 | 
			
		||||
	if ((s = getenv("TMPDIR")) == NULL || *s == '\0')
 | 
			
		||||
		xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid);
 | 
			
		||||
	else
 | 
			
		||||
	if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
 | 
			
		||||
		xsnprintf(base, sizeof base, "%s/", s);
 | 
			
		||||
	else if ((s = getenv("TMPDIR")) != NULL && *s != '\0')
 | 
			
		||||
		xsnprintf(base, sizeof base, "%s/tmux-%u", s, uid);
 | 
			
		||||
	else
 | 
			
		||||
		xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid);
 | 
			
		||||
 | 
			
		||||
	if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST)
 | 
			
		||||
		return (NULL);
 | 
			
		||||
@@ -244,18 +248,15 @@ main(int argc, char **argv)
 | 
			
		||||
	malloc_options = (char *) "AFGJPX";
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	setlocale(LC_TIME, "");
 | 
			
		||||
 | 
			
		||||
	quiet = flags = 0;
 | 
			
		||||
	label = path = NULL;
 | 
			
		||||
	login_shell = (**argv == '-');
 | 
			
		||||
	while ((opt = getopt(argc, argv, "28c:Cdf:lL:qS:uUvV")) != -1) {
 | 
			
		||||
	while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUv")) != -1) {
 | 
			
		||||
		switch (opt) {
 | 
			
		||||
		case '2':
 | 
			
		||||
			flags |= IDENTIFY_256COLOURS;
 | 
			
		||||
			flags &= ~IDENTIFY_88COLOURS;
 | 
			
		||||
			break;
 | 
			
		||||
		case '8':
 | 
			
		||||
			flags |= IDENTIFY_88COLOURS;
 | 
			
		||||
			flags &= ~IDENTIFY_256COLOURS;
 | 
			
		||||
			break;
 | 
			
		||||
		case 'c':
 | 
			
		||||
			free(shell_cmd);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user