summaryrefslogtreecommitdiffstats
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-07-17 14:36:41 +0000
committerTiago Cunha <tcunha@gmx.com>2010-07-17 14:36:41 +0000
commitad6a528f611bf793f0c3d4f832f34a1c778068e3 (patch)
tree7cc69a9c6ed4419842ac808a695b568e04b1d918 /cmd-run-shell.c
parent46f27eab22f78ec35a11b6e5b4d61e705c96eca1 (diff)
Sync OpenBSD patchset 734:
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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 0a4a4095..5e7701f5 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-run-shell.c,v 1.7 2010-06-06 00:04:59 tcunha Exp $ */
+/* $Id: cmd-run-shell.c,v 1.8 2010-07-17 14:36:40 tcunha Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -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--;