summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2008-01-15 16:51:30 -0500
committerJohn (J5) Palmieri <johnp@redhat.com>2008-01-15 16:51:30 -0500
commit6cfcabbc006c1a7d5dc506ea317e2f39354e0459 (patch)
treeb2ab35d8c387eac2ef54cc20ebd221ab6584c0ba
parentc0910a0bda980888f3261486fc873f5510de48a9 (diff)
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-spawn.c (babysit_signal_handler): check write return value so we don't hang (FDO Bug #11665)
-rw-r--r--ChangeLog7
-rw-r--r--dbus/dbus-spawn.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 22a5f0c1..68b656da 100644
--- 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)
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c
index ba6e6ddf..d74b3265 100644
--- a/dbus/dbus-spawn.c
+++ b/dbus/dbus-spawn.c
@@ -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