summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/server-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-09 12:16:17 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-09 12:16:17 +0000
commit9bc4b7ce122eedd1d01965671b20e67052a1e10e (patch)
treeba36ea8678278c0a26d3c324368df44700644b97 /usr.bin/tmux/server-client.c
parent2f78c65cf8ab91293f5e831cefa1a07171ba0a35 (diff)
Wait until the initial command sequence is done before sending a device
attributes request and other bits that prompt a reply from the terminal. This means that stray relies are not left on the terminal if the command has attached and then immediately detached and tmux will not be around to receive them. Prompted by a problem report from espie@.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r--usr.bin/tmux/server-client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index ecf192391c2..0605445e659 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.313 2020/04/01 11:47:44 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.314 2020/04/09 12:16:16 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1898,6 +1898,8 @@ server_client_command_done(struct cmdq_item *item, __unused void *data)
if (~c->flags & CLIENT_ATTACHED)
c->flags |= CLIENT_EXIT;
+ else if (~c->flags & CLIENT_DETACHING)
+ tty_send_requests(&c->tty);
return (CMD_RETURN_NORMAL);
}