summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-04-11 22:37:13 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-11 22:37:48 +0200
commit9bdc770ccd3e23419a0d908782a661dd81a36bc8 (patch)
tree3664479ac33454ec5a3e378ce1ddca097b20852d /src/shared/util.c
parent4771148bb92ace55eaa6759a53d04a0f2de9b0d2 (diff)
polkit: when spawning off agent, wait until the agent is fully initialized
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 7f41fc4f5e..7778b0a06b 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -6036,7 +6036,7 @@ int fd_inc_rcvbuf(int fd, size_t n) {
return 1;
}
-int fork_agent(pid_t *pid, const char *path, ...) {
+int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *path, ...) {
pid_t parent_pid, agent_pid;
int fd;
bool stdout_is_tty, stderr_is_tty;
@@ -6073,7 +6073,7 @@ int fork_agent(pid_t *pid, const char *path, ...) {
_exit(EXIT_SUCCESS);
/* Don't leak fds to the agent */
- close_all_fds(NULL, 0);
+ close_all_fds(except, n_except);
stdout_is_tty = isatty(STDOUT_FILENO);
stderr_is_tty = isatty(STDERR_FILENO);