Index: glib//ChangeLog
===================================================================
RCS file: /export/cvs/gnome-2.0/glib/ChangeLog,v
retrieving revision 1.1625
diff -p -u -5 -r1.1625 ChangeLog
--- glib//ChangeLog	2004/08/05 20:53:25	1.1625
+++ glib//ChangeLog	2004/08/06 10:56:15
@@ -1,5 +1,12 @@
+Fri Aug  6 16:00:00 2004  Archana Shah  <archana.shah@wipro.com>
+
+	* glib/gmain.c (g_child_watch_source_init_multi_threaded) :
+	Replaced signal () call by sigaction (). So that glib get SIGCHLD
+	every time.
+	Fixes bug# 136867
+
 Thu Aug  5 20:53:00 2004  Ray Strode  <rstrode@redhat.com>
 
 	* glib/gutils.h (g_get_codeset): strdup result so caller
 	doesn't free internally managed memory.
 
Index: glib//glib/gmain.c
===================================================================
RCS file: /export/cvs/gnome-2.0/glib/glib/gmain.c,v
retrieving revision 1.119
diff -p -u -5 -r1.119 gmain.c
--- glib//glib/gmain.c	2004/05/10 19:21:28	1.119
+++ glib//glib/gmain.c	2004/08/06 10:56:15
@@ -3616,10 +3616,11 @@ child_watch_helper_thread (gpointer data
 
 static void
 g_child_watch_source_init_multi_threaded (void)
 {
   GError *error = NULL;
+  struct sigaction action;
 
   g_assert (g_thread_supported());
 
   if (pipe (child_watch_wake_up_pipe) < 0)
     g_error ("Cannot create wake up pipe: %s\n", g_strerror (errno));
@@ -3628,11 +3629,15 @@ g_child_watch_source_init_multi_threaded
   /* We create a helper thread that polls on the wakeup pipe indefinitely */
   /* FIXME: Think this through for races */
   if (g_thread_create (child_watch_helper_thread, NULL, FALSE, &error) == NULL)
     g_error ("Cannot create a thread to monitor child exit status: %s\n", error->message);
   child_watch_init_state = CHILD_WATCH_INITIALIZED_THREADED;
-  signal (SIGCHLD, g_child_watch_signal_handler);
+
+  action.sa_handler = g_child_watch_signal_handler ;
+  sigemptyset (&action.sa_mask);
+  action.sa_flags = SA_RESTART | SA_NOCLDSTOP;
+  sigaction (SIGCHLD, &action, NULL);
 }
 
 static void
 g_child_watch_source_init_promote_single_to_threaded (void)
 {
