=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-new-session.c,v retrieving revision 1.41 retrieving revision 1.42 diff -c -r1.41 -r1.42 *** src/usr.bin/tmux/cmd-new-session.c 2012/03/17 22:35:09 1.41 --- src/usr.bin/tmux/cmd-new-session.c 2012/05/06 07:38:17 1.42 *************** *** 1,4 **** ! /* $OpenBSD: cmd-new-session.c,v 1.41 2012/03/17 22:35:09 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-new-session.c,v 1.42 2012/05/06 07:38:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 63,69 **** struct termios tio, *tiop; struct passwd *pw; const char *newname, *target, *update, *cwd, *errstr; ! char *overrides, *cmd, *cause; int detached, idx; u_int sx, sy, i; --- 63,69 ---- struct termios tio, *tiop; struct passwd *pw; const char *newname, *target, *update, *cwd, *errstr; ! char *cmd, *cause; int detached, idx; u_int sx, sy, i; *************** *** 128,141 **** /* Open the terminal if necessary. */ if (!detached && ctx->cmdclient != NULL) { ! if (!(ctx->cmdclient->flags & CLIENT_TERMINAL)) { ! ctx->error(ctx, "not a terminal"); ! return (-1); ! } ! ! overrides = ! options_get_string(&global_s_options, "terminal-overrides"); ! if (tty_open(&ctx->cmdclient->tty, overrides, &cause) != 0) { ctx->error(ctx, "open terminal failed: %s", cause); xfree(cause); return (-1); --- 128,134 ---- /* Open the terminal if necessary. */ if (!detached && ctx->cmdclient != NULL) { ! if (server_client_open(ctx->cmdclient, NULL, &cause) != 0) { ctx->error(ctx, "open terminal failed: %s", cause); xfree(cause); return (-1);