diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2008-01-15 16:51:30 -0500 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2008-01-15 16:51:30 -0500 |
commit | 6cfcabbc006c1a7d5dc506ea317e2f39354e0459 (patch) | |
tree | b2ab35d8c387eac2ef54cc20ebd221ab6584c0ba /dbus/dbus-spawn.c | |
parent | c0910a0bda980888f3261486fc873f5510de48a9 (diff) | |
download | dbus-6cfcabbc006c1a7d5dc506ea317e2f39354e0459.tar.gz |
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)
Diffstat (limited to 'dbus/dbus-spawn.c')
-rw-r--r-- | dbus/dbus-spawn.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 |