summaryrefslogtreecommitdiffstats
path: root/spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/spawn.c b/spawn.c
index e3f8debe..c47b11f4 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"
@@ -398,6 +396,9 @@ spawn_pane(struct spawn_context *sc, char **cause)
now.c_cc[VERASE] = '\177';
else
now.c_cc[VERASE] = key;
+#ifdef IUTF8
+ now.c_iflag |= IUTF8;
+#endif
if (tcsetattr(STDIN_FILENO, TCSANOW, &now) != 0)
_exit(1);
@@ -440,6 +441,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->flags &= ~PANE_EXITED;
sigprocmask(SIG_SETMASK, &oldset, NULL);