diff options
author | 2010-07-11 17:06:45 +0000 | |
---|---|---|
committer | 2010-07-11 17:06:45 +0000 | |
commit | 3c9f218d411024f3dfaff15b0b39b7a689a87c2f (patch) | |
tree | 07e2289865737116e45f40c51716451b315bb1c4 /usr.bin/tmux/cmd-if-shell.c | |
parent | bcrypt_gensalt is already declared in pwd.h (diff) | |
download | wireguard-openbsd-3c9f218d411024f3dfaff15b0b39b7a689a87c2f.tar.xz wireguard-openbsd-3c9f218d411024f3dfaff15b0b39b7a689a87c2f.zip |
Return the command client return code with MSG_EXIT now that MSG_ERROR and
MSG_PRINT are unused.
New clients should be compatible with old tmux servers but vice versa may print
an error.
Diffstat (limited to 'usr.bin/tmux/cmd-if-shell.c')
-rw-r--r-- | usr.bin/tmux/cmd-if-shell.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-if-shell.c b/usr.bin/tmux/cmd-if-shell.c index ecb6a12657d..02ab6bedc5c 100644 --- a/usr.bin/tmux/cmd-if-shell.c +++ b/usr.bin/tmux/cmd-if-shell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-if-shell.c,v 1.7 2009/11/13 19:53:29 nicm Exp $ */ +/* $OpenBSD: cmd-if-shell.c,v 1.8 2010/07/11 17:06:45 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -104,10 +104,13 @@ cmd_if_shell_free(void *data) { struct cmd_if_shell_data *cdata = data; struct cmd_ctx *ctx = &cdata->ctx; + struct msg_exit_data exitdata; if (ctx->cmdclient != NULL) { ctx->cmdclient->references--; - server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0); + exitdata.retcode = ctx->cmdclient->retcode; + server_write_client( + ctx->cmdclient, MSG_EXIT, &exitdata, sizeof exitdata); } if (ctx->curclient != NULL) ctx->curclient->references--; |