=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.c,v retrieving revision 1.61 retrieving revision 1.62 diff -c -r1.61 -r1.62 *** src/usr.bin/tmux/tmux.c 2009/11/26 21:37:13 1.61 --- src/usr.bin/tmux/tmux.c 2009/12/03 22:50:10 1.62 *************** *** 1,4 **** ! /* $OpenBSD: tmux.c,v 1.61 2009/11/26 21:37:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tmux.c,v 1.62 2009/12/03 22:50:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 219,225 **** main(int argc, char **argv) { struct cmd_list *cmdlist; ! struct cmd *cmd; enum msgtype msg; struct passwd *pw; struct options *so, *wo; --- 219,225 ---- main(int argc, char **argv) { struct cmd_list *cmdlist; ! struct cmd *cmd; enum msgtype msg; struct passwd *pw; struct options *so, *wo; *************** *** 311,317 **** } environ_init(&global_environ); ! for (var = environ; *var != NULL; var++) environ_put(&global_environ, *var); options_init(&global_s_options, NULL); --- 311,317 ---- } environ_init(&global_environ); ! for (var = environ; *var != NULL; var++) environ_put(&global_environ, *var); options_init(&global_s_options, NULL); *************** *** 394,403 **** options_set_string(wo, "window-status-format", "#I:#W#F"); options_set_string(wo, "window-status-current-format", "#I:#W#F"); options_set_number(wo, "xterm-keys", 0); ! options_set_number(wo, "remain-on-exit", 0); options_set_number(wo, "synchronize-panes", 0); ! if (flags & IDENTIFY_UTF8) { options_set_number(so, "status-utf8", 1); options_set_number(wo, "utf8", 1); } else { --- 394,403 ---- options_set_string(wo, "window-status-format", "#I:#W#F"); options_set_string(wo, "window-status-current-format", "#I:#W#F"); options_set_number(wo, "xterm-keys", 0); ! options_set_number(wo, "remain-on-exit", 0); options_set_number(wo, "synchronize-panes", 0); ! if (flags & IDENTIFY_UTF8) { options_set_number(so, "status-utf8", 1); options_set_number(wo, "utf8", 1); } else { *************** *** 432,438 **** exit(1); } } ! if (label == NULL) label = xstrdup("default"); if (path == NULL && (path = makesockpath(label)) == NULL) { --- 432,438 ---- exit(1); } } ! if (label == NULL) label = xstrdup("default"); if (path == NULL && (path = makesockpath(label)) == NULL) { *************** *** 447,460 **** len = 0; } else { fill_session(&cmddata); ! cmddata.argc = argc; if (cmd_pack_argv( argc, argv, cmddata.argv, sizeof cmddata.argv) != 0) { log_warnx("command too long"); exit(1); } ! msg = MSG_COMMAND; buf = &cmddata; len = sizeof cmddata; --- 447,460 ---- len = 0; } else { fill_session(&cmddata); ! cmddata.argc = argc; if (cmd_pack_argv( argc, argv, cmddata.argv, sizeof cmddata.argv) != 0) { log_warnx("command too long"); exit(1); } ! msg = MSG_COMMAND; buf = &cmddata; len = sizeof cmddata; *************** *** 490,496 **** event_init(); ! imsg_compose(main_ibuf, msg, PROTOCOL_VERSION, -1, -1, buf, len); main_set_signals(); --- 490,496 ---- event_init(); ! imsg_compose(main_ibuf, msg, PROTOCOL_VERSION, -1, -1, buf, len); main_set_signals(); *************** *** 526,532 **** fatal("sigaction failed"); if (sigaction(SIGTSTP, &sigact, NULL) != 0) fatal("sigaction failed"); ! signal_set(&main_ev_sigterm, SIGTERM, main_signal, NULL); signal_add(&main_ev_sigterm, NULL); } --- 526,532 ---- fatal("sigaction failed"); if (sigaction(SIGTSTP, &sigact, NULL) != 0) fatal("sigaction failed"); ! signal_set(&main_ev_sigterm, SIGTERM, main_signal, NULL); signal_add(&main_ev_sigterm, NULL); } *************** *** 550,556 **** fatal("sigaction failed"); if (sigaction(SIGTSTP, &sigact, NULL) != 0) fatal("sigaction failed"); ! event_del(&main_ev_sigterm); } --- 550,556 ---- fatal("sigaction failed"); if (sigaction(SIGTSTP, &sigact, NULL) != 0) fatal("sigaction failed"); ! event_del(&main_ev_sigterm); } *************** *** 572,578 **** if (events & EV_READ) main_dispatch(shellcmd); ! if (events & EV_WRITE) { if (msgbuf_write(&main_ibuf->w) < 0) fatalx("msgbuf_write failed"); --- 572,578 ---- if (events & EV_READ) main_dispatch(shellcmd); ! if (events & EV_WRITE) { if (msgbuf_write(&main_ibuf->w) < 0) fatalx("msgbuf_write failed");