From 1504b281e944fb41cc2319c411fef4881df58b3b Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Tue, 15 Oct 2013 13:23:09 +0800 Subject: [PATCH] Close unused inherited file descriptor Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68559 Reviewed-by: Simon McVittie --- dbus/dbus-spawn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index af624e7..d1478f0 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -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); -- 2.7.4