summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-07-03 08:16:03 +0000
committernicm <nicm@openbsd.org>2017-07-03 08:16:03 +0000
commitf35e5f52033214ab35bcaa6f91244d0b05b9f768 (patch)
treec306ebc069671046dc0cc0284e545548d40526e7 /usr.bin/tmux/server.c
parentDrop the KERNEL_LOCK() in pf_purge_thread(). (diff)
downloadwireguard-openbsd-f35e5f52033214ab35bcaa6f91244d0b05b9f768.tar.xz
wireguard-openbsd-f35e5f52033214ab35bcaa6f91244d0b05b9f768.zip
Do not close panes until process has exited and any outstanding data
has been written to the pipe-pane event if there is one. GitHub issue 991.
Diffstat (limited to 'usr.bin/tmux/server.c')
-rw-r--r--usr.bin/tmux/server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c
index 5aa9b0accad..29a2abede8f 100644
--- a/usr.bin/tmux/server.c
+++ b/usr.bin/tmux/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.171 2017/06/04 08:25:57 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.172 2017/07/03 08:16:03 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -406,7 +406,12 @@ server_child_exited(pid_t pid, int status)
TAILQ_FOREACH(wp, &w->panes, entry) {
if (wp->pid == pid) {
wp->status = status;
- server_destroy_pane(wp, 1);
+
+ log_debug("%%%u exited", wp->id);
+ wp->flags |= PANE_EXITED;
+
+ if (window_pane_destroy_ready(wp))
+ server_destroy_pane(wp, 1);
break;
}
}