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.
This commit is contained in:
nicm
2017-07-03 08:16:03 +00:00
parent 42285ac989
commit 28687f2d55
4 changed files with 51 additions and 5 deletions

View File

@ -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;
}
}