[vte] widget: Reap only when a child is present



commit 5f19e0b08cb06c76d989592e1a859ac3a23b8b4b
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Dec 4 16:46:00 2014 +0100

    widget: Reap only when a child is present
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740929

 src/vte.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 57b4bb4..f790a3b 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8455,11 +8455,11 @@ vte_terminal_finalize(GObject *object)
         if (terminal->pvt->child_watch_source != 0) {
                 g_source_remove (terminal->pvt->child_watch_source);
                 terminal->pvt->child_watch_source = 0;
+                g_child_watch_add_full(G_PRIORITY_HIGH,
+                                       terminal->pvt->pty_pid,
+                                       (GChildWatchFunc)vte_terminal_child_watch_cb,
+                                       NULL, NULL);
         }
-        g_child_watch_add_full(G_PRIORITY_HIGH,
-                               terminal->pvt->pty_pid,
-                               (GChildWatchFunc)vte_terminal_child_watch_cb,
-                               NULL, NULL);
 
        /* Stop processing input. */
        vte_terminal_stop_processing (terminal);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]