summaryrefslogtreecommitdiffstats
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-07-11 17:06:45 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-07-11 17:06:45 +0000
commitb9c873cdaa3256f95a007d501fcab8375930bd94 (patch)
tree5884e8709758af698650ec415d7c1a343b4f71b8 /cmd-run-shell.c
parentb4b9b831ee9f6b1848657939fb19a7b7076d26f4 (diff)
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 'cmd-run-shell.c')
-rw-r--r--cmd-run-shell.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 3b6844eb..f9d1e237 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -131,10 +131,13 @@ cmd_run_shell_free(void *data)
{
struct cmd_run_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--;