summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vtegtk.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 9e541be1..c435b55c 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -2543,10 +2543,12 @@ spawn_async_cb (GObject *source,
/* Automatically watch the child */
if (terminal != nullptr) {
- if (pid != -1)
+ if (pid != -1) {
+ vte_terminal_set_pty(terminal, pty);
vte_terminal_watch_child(terminal, pid);
- else
+ } else {
vte_terminal_set_pty(terminal, nullptr);
+ }
} else {
if (pid != -1) {
vte_reaper_add_child(pid);
@@ -2671,8 +2673,6 @@ vte_terminal_spawn_async(VteTerminal *terminal,
return;
}
- vte_terminal_set_pty(terminal, pty);
-
guint spawn_flags = (guint)spawn_flags_;
/* We do NOT support this flag. If you want to have some FD open in the child