From b9c873cdaa3256f95a007d501fcab8375930bd94 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 11 Jul 2010 17:06:45 +0000 Subject: 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. --- cmd-if-shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd-if-shell.c') diff --git a/cmd-if-shell.c b/cmd-if-shell.c index 1779486a..367bb691 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -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--; -- cgit