summaryrefslogtreecommitdiff
path: root/dbus
diff options
context:
space:
mode:
authorChengwei Yang <chengwei.yang@intel.com>2013-10-15 13:23:09 +0800
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-11-01 12:54:06 +0000
commit1504b281e944fb41cc2319c411fef4881df58b3b (patch)
tree39eb411c61073daf985e2f7c8aed48b9407be8ef /dbus
parente326e762e9f490e2609c122a09962fa77a282f81 (diff)
downloaddbus-1504b281e944fb41cc2319c411fef4881df58b3b.tar.gz
Close unused inherited file descriptor
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68559 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus-spawn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c
index af624e7c..d1478f00 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);