gmain: Only run through signal delivery once per read()
authorColin Walters <walters@verbum.org>
Wed, 8 Jun 2011 15:31:14 +0000 (11:31 -0400)
committerColin Walters <walters@verbum.org>
Tue, 14 Jun 2011 23:23:36 +0000 (19:23 -0400)
This is what I intended to do before.

https://bugzilla.gnome.org/show_bug.cgi?id=652072

glib/gmain.c

index c95c42c..c84d7b9 100644 (file)
@@ -4628,14 +4628,16 @@ unix_signal_helper_thread (gpointer data)
              g_warning ("Invalid char '%c' read from child watch pipe", b[i]);
              break;
            }
-         if (sigterm_received)
-           deliver_unix_signal (SIGTERM);
-         if (sigint_received)
-           deliver_unix_signal (SIGINT);
-         if (sighup_received)
-           deliver_unix_signal (SIGHUP);
-         _g_main_wake_up_all_contexts ();
        }
+      if (sigterm_received)
+       deliver_unix_signal (SIGTERM);
+      if (sigint_received)
+       deliver_unix_signal (SIGINT);
+      if (sighup_received)
+       deliver_unix_signal (SIGHUP);
+      if (sigchld_received)
+       deliver_sigchld ();
+      _g_main_wake_up_all_contexts ();
     }
 }