summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-13 19:16:14 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-13 19:16:14 +0000
commite2ff51f93f934c8e5317dbafe95a1783b16287a0 (patch)
tree139de2edca62a556200321782bebba699a6e235e /cmd-new-session.c
parent52793e7a3fc7f53b173ee887c221ff4ed38499e8 (diff)
Rather than telling the client to exit in the function when creating a new
session detached, let the caller do it. Allows "tmux new -d \; attach" to work.
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index 5dc27879..64337e6d 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -239,8 +239,6 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
if (ctx->cmdclient != NULL) {
if (!detached)
server_write_client(ctx->cmdclient, MSG_READY, NULL, 0);
- else
- server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0);
}
/* Set the client to the new session. */
@@ -255,7 +253,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
}
recalculate_sizes();
- return (1); /* 1 means don't tell command client to exit */
+ return (!detached); /* 1 means don't tell command client to exit */
}
void