summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-spawn.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-04-22 04:22:51 +0200
committerLennart Poettering <lennart@poettering.net>2009-05-20 02:09:31 +0200
commit44f3a1465a5a3f6d2e022409a960443441662629 (patch)
tree7ade2ca895107f2b5f7de12bbe3bb619cf863477 /dbus/dbus-spawn.c
parent004f01fa451b0341e7ea69ce7f08a1c4690f759a (diff)
cloexec: set FD_CLOEXEC for all full duplex pipes
All users of full duplex pipes enable FD_CLOEXEC later anyway so let's just do it as part of _dbus_full_duplex_pipe. By side effect this allows to make use of SOCK_CLOEXEC which fixes a race when forking/execing from a different thread at the same time as we ar in this function.
Diffstat (limited to 'dbus/dbus-spawn.c')
-rw-r--r--dbus/dbus-spawn.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c
index f4e3b587..b0b843ea 100644
--- a/dbus/dbus-spawn.c
+++ b/dbus/dbus-spawn.c
@@ -1123,9 +1123,6 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
if (!_dbus_full_duplex_pipe (&babysitter_pipe[0], &babysitter_pipe[1], TRUE, error))
goto cleanup_and_fail;
- _dbus_fd_set_close_on_exec (babysitter_pipe[0]);
- _dbus_fd_set_close_on_exec (babysitter_pipe[1]);
-
/* Setting up the babysitter is only useful in the parent,
* but we don't want to run out of memory and fail
* after we've already forked, since then we'd leak