check write return value so we don't hang (FDO Bug #11665)
authorJohn (J5) Palmieri <johnp@redhat.com>
Tue, 15 Jan 2008 21:51:30 +0000 (16:51 -0500)
committerJohn (J5) Palmieri <johnp@redhat.com>
Tue, 15 Jan 2008 21:51:30 +0000 (16:51 -0500)
2008-01-15  John (J5) Palmieri  <johnp@redhat.com>

* patch by Peter O'Gorman <pogma at thewrittenword dot com>

* dbus/dbus-spawn.c (babysit_signal_handler): check write return value
so we don't hang (FDO Bug #11665)

ChangeLog
dbus/dbus-spawn.c

index 22a5f0c..68b656d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@
 
        * patch by Peter O'Gorman <pogma at thewrittenword dot com>
 
+       * dbus/dbus-spawn.c (babysit_signal_handler): check write return value
+       so we don't hang (FDO Bug #11665)
+
+2008-01-15  John (J5) Palmieri  <johnp@redhat.com>
+
+       * patch by Peter O'Gorman <pogma at thewrittenword dot com>
+
        * dbus/dbus-sysdeps.h: support for AIX poll implementation (FDO Bug 
        #11666)
 
index ba6e6dd..d74b326 100644 (file)
@@ -982,9 +982,9 @@ babysit_signal_handler (int signo)
 {
   char b = '\0';
  again:
-  write (babysit_sigchld_pipe, &b, 1);
-  if (errno == EINTR)
-    goto again;
+  if (write (babysit_sigchld_pipe, &b, 1) <= 0) 
+    if (errno == EINTR)
+      goto again;
 }
 
 static void