From a5f1f9aa41d75711960b3599aec5363dfb8bca22 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Mon, 9 Sep 2013 16:42:07 +0800 Subject: [PATCH v3 3/3] Close unused inherited file descriptor --- dbus/dbus-spawn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index 8c0a764..b29ef4d 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -1285,6 +1285,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, */ signal (SIGPIPE, SIG_IGN); + close_and_invalidate (&babysitter_pipe[1]); #ifdef HAVE_SYSTEMD dup2 (fd_out, STDOUT_FILENO); dup2 (fd_err, STDERR_FILENO); @@ -1299,6 +1300,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); -- 1.7.9.5