Merge branch 'obsd-master'

Conflicts:
	cmd-pipe-pane.c
	proc.c
	tmux.c
	window.c
This commit is contained in:
Thomas Adam
2017-07-12 13:39:59 +01:00
12 changed files with 144 additions and 184 deletions

12
tmux.c
View File

@ -41,6 +41,7 @@ struct hooks *global_hooks;
struct timeval start_time;
const char *socket_path;
int ptm_fd = -1;
const char *shell_command;
static __dead void usage(void);
static char *make_label(const char *);
@ -187,8 +188,8 @@ find_home(void)
int
main(int argc, char **argv)
{
char *path, *label, tmp[PATH_MAX];
char *shellcmd = NULL, **var;
char *path, *label, **var;
char tmp[PATH_MAX];
const char *s, *shell;
int opt, flags, keys;
const struct options_table_entry *oe;
@ -217,8 +218,7 @@ main(int argc, char **argv)
flags |= CLIENT_256COLOURS;
break;
case 'c':
free(shellcmd);
shellcmd = xstrdup(optarg);
shell_command = optarg;
break;
case 'C':
if (flags & CLIENT_CONTROL)
@ -258,7 +258,7 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
if (shellcmd != NULL && argc != 0)
if (shell_command != NULL && argc != 0)
usage();
if ((ptm_fd = getptmfd()) == -1)
@ -348,5 +348,5 @@ main(int argc, char **argv)
free(label);
/* Pass control to the client. */
exit(client_main(osdep_event_init(), argc, argv, flags, shellcmd));
exit(client_main(osdep_event_init(), argc, argv, flags));
}