_dbus_babysitter_unref: avoid infinite loop if waitpid() returns EINTR
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 4 Sep 2013 16:53:23 +0000 (17:53 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 5 Sep 2013 15:31:13 +0000 (16:31 +0100)
commitfc600b6a8f0dec5642b45c1026dee24c9adb9bc2
tree517f6d98df94f8868a467935b5955bfe6c7bdc84
parentad5b3128ba219c895ee084eb027a296b207df16b
_dbus_babysitter_unref: avoid infinite loop if waitpid() returns EINTR

If waitpid() failed with EINTR, we'd go back for another go, but
because ret is nonzero, we'd skip the waitpid() and just keep looping.

Also avoid an unnecessary "goto" in favour of a proper loop, to make it
more clearly correct.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68945
Reviewed-by: Colin Walters <walters@verbum.org>
dbus/dbus-spawn.c