Add back utempter code, reported by Peter Schellenbach.

pull/2030/head
Nicholas Marriott 2019-12-18 15:58:06 +00:00
parent d0cd68d5e4
commit 54efe33799
1 changed files with 9 additions and 0 deletions

View File

@ -433,6 +433,15 @@ spawn_pane(struct spawn_context *sc, char **cause)
_exit(1);
complete:
#ifdef HAVE_UTEMPTER
if (~new_wp->flags & PANE_EMPTY) {
xasprintf(&cp, "tmux(%lu).%%%u", (long)getpid(), new_wp->id);
utempter_add_record(new_wp->fd, cp);
kill(getpid(), SIGCHLD);
free(cp);
}
#endif
new_wp->pipe_off = 0;
new_wp->flags &= ~PANE_EXITED;