summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server-client.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-04-09 12:16:16 +0000
committernicm <nicm@openbsd.org>2020-04-09 12:16:16 +0000
commitab7caece48523dabdbca84386419ff3850b6d95b (patch)
treee6f81258b41747b34f90f37055aa3603803cb4f6 /usr.bin/tmux/server-client.c
parentfind -exec +: use sysconf to find the kernel's idea of ARG_MAX (diff)
downloadwireguard-openbsd-ab7caece48523dabdbca84386419ff3850b6d95b.tar.xz
wireguard-openbsd-ab7caece48523dabdbca84386419ff3850b6d95b.zip
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);
}