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)
This commit is contained in:
John (J5) Palmieri 2008-01-15 16:51:30 -05:00
parent c0910a0bda
commit 6cfcabbc00
2 changed files with 10 additions and 3 deletions

View file

@ -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>

View 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