Close unused inherited file descriptor

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68559
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
Chengwei Yang 2013-10-15 13:23:09 +08:00 committed by Simon McVittie
parent e326e762e9
commit 1504b281e9

View file

@ -1339,6 +1339,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
*/
signal (SIGPIPE, SIG_IGN);
close_and_invalidate (&babysitter_pipe[1]);
#ifdef HAVE_SYSTEMD
/* log to systemd journal if possible */
if (fd_out >= 0)
@ -1356,6 +1357,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
}
else
{
close_and_invalidate (&child_err_report_pipe[WRITE_END]);
#ifdef HAVE_SYSTEMD
close_and_invalidate (&fd_out);
close_and_invalidate (&fd_err);