diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/client.c | 47 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-server-info.c | 7 |
2 files changed, 27 insertions, 27 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index 1d90031f996..129832d23d9 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.23 2009/10/13 13:11:06 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.24 2009/10/13 13:15:26 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -216,32 +216,33 @@ out: * Print exit status message, unless running as a login shell where it * would either be pointless or irritating. */ - if (!login_shell) { - if (sigterm) { - printf("[terminated]\n"); + if (sigterm) { + printf("[terminated]\n"); + return (1); + } + switch (cctx->exittype) { + case CCTX_DIED: + printf("[lost server]\n"); + return (0); + case CCTX_SHUTDOWN: + if (!login_shell) + printf("[server exited]\n"); + return (0); + case CCTX_EXIT: + if (cctx->errstr != NULL) { + printf("[error: %s]\n", cctx->errstr); return (1); } - switch (cctx->exittype) { - case CCTX_DIED: - printf("[lost server]\n"); - return (0); - case CCTX_SHUTDOWN: - printf("[server exited]\n"); - return (0); - case CCTX_EXIT: - if (cctx->errstr != NULL) { - printf("[error: %s]\n", cctx->errstr); - return (1); - } + if (!login_shell) printf("[exited]\n"); - return (0); - case CCTX_DETACH: + return (0); + case CCTX_DETACH: + if (!login_shell) printf("[detached]\n"); - return (0); - default: - printf("[unknown error]\n"); - return (1); - } + return (0); + default: + printf("[unknown error]\n"); + return (1); } } diff --git a/usr.bin/tmux/cmd-server-info.c b/usr.bin/tmux/cmd-server-info.c index 4802f3b1622..9f2450c5a2c 100644 --- a/usr.bin/tmux/cmd-server-info.c +++ b/usr.bin/tmux/cmd-server-info.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-server-info.c,v 1.10 2009/09/07 21:01:50 nicm Exp $ */ +/* $OpenBSD: cmd-server-info.c,v 1.11 2009/10/13 13:15:26 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -68,9 +68,8 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) tim = ctime(&start_time); *strchr(tim, '\n') = '\0'; ctx->print(ctx, "pid %ld, started %s", (long) getpid(), tim); - ctx->print(ctx, "socket path %s, debug level %d%s%s", - socket_path, debug_level, be_quiet ? ", quiet" : "", - login_shell ? ", login shell" : ""); + ctx->print(ctx, "socket path %s, debug level %d%s", + socket_path, debug_level, be_quiet ? ", quiet" : ""); if (uname(&un) == 0) { ctx->print(ctx, "system is %s %s %s %s", un.sysname, un.release, un.version, un.machine); |