diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-08-16 19:07:40 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-08-16 19:07:40 +0000 |
commit | 64950f4524c2937267c3ae73c410f1ce7eb015b7 (patch) | |
tree | d07d78bea0f1523c0fe878a3aa300032b7bb17da | |
parent | 8973af82c5199f7099a6b8faf92a30b372aab80b (diff) | |
download | rtmux-64950f4524c2937267c3ae73c410f1ce7eb015b7.tar.gz rtmux-64950f4524c2937267c3ae73c410f1ce7eb015b7.tar.bz2 rtmux-64950f4524c2937267c3ae73c410f1ce7eb015b7.zip |
Sync OpenBSD patchset 255:
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.
-rw-r--r-- | cmd-new-session.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c index dbb7d117..6324030f 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -1,4 +1,4 @@ -/* $Id: cmd-new-session.c,v 1.53 2009-08-16 19:04:05 tcunha Exp $ */ +/* $Id: cmd-new-session.c,v 1.54 2009-08-16 19:07:40 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -240,8 +240,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. */ @@ -256,7 +254,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 |