aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authornicm <nicm>2017-07-03 08:16:03 +0000
committernicm <nicm>2017-07-03 08:16:03 +0000
commit28687f2d55fb30654a7164bf1445f47b052ea115 (patch)
treeff0f9efa87a6ba860533a7c3c9d505c351783d71 /server.c
parent42285ac9893f6ce82b44d00061a4ef702ef22cbe (diff)
downloadrtmux-28687f2d55fb30654a7164bf1445f47b052ea115.tar.gz
rtmux-28687f2d55fb30654a7164bf1445f47b052ea115.tar.bz2
rtmux-28687f2d55fb30654a7164bf1445f47b052ea115.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 'server.c')
-rw-r--r--server.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/server.c b/server.c
index 4dc739d0..294d2848 100644
--- a/server.c
+++ b/server.c
@@ -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;
}
}