dbus-spawn: do not forget the exec() errno when the grandchild exits
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 11 Sep 2014 09:59:32 +0000 (10:59 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 29 Oct 2014 14:16:58 +0000 (14:16 +0000)
commit595dc4f888055164fa5ae77079b79b0e84471092
tree54317fc5a2b7571265a79fbcc2c9aac5f1077904
parentacec88f32ac8df62d07b2d98184b0f9e2fcf2ceb
dbus-spawn: do not forget the exec() errno when the grandchild exits

As is already noted in a comment in
_dbus_babysitter_set_child_exit_error(), if the grandchild fails
to exec() the desired process, we get both CHILD_EXEC_FAILED (with
an errno) and CHILD_EXITED (with a status), and we want to report
the former, since it is more informative. However, clearing
sitter->errnum meant we lose the errno value.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24821
Reviewed-by: Ross Lagerwall
dbus/dbus-spawn.c