]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
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 22a5f0c1962b05eb8e347e537badf471862f50c6..68b656da1ec3b95e6685f12c95d242d5c74b99f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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)
+
 2008-01-15  John (J5) Palmieri  <johnp@redhat.com>
 
        * patch by Peter O'Gorman <pogma at thewrittenword dot com>
index ba6e6ddfd0602ef8b93bc39874621efff8f0ac2e..d74b326582ac469c545b84cad7ea397e578af2a0 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