summaryrefslogtreecommitdiffstats
path: root/spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/spawn.c b/spawn.c
index f05887b2..f1ea87d2 100644
--- a/spawn.c
+++ b/spawn.c
@@ -19,12 +19,10 @@
#include <sys/types.h>
#include <errno.h>
-#include <paths.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <util.h>
#include "tmux.h"
@@ -438,6 +436,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;