summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-11 18:14:11 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-11 18:31:49 +0200
commit54eb2300ae07d28922a18a9d14dc597850535e9c (patch)
tree8665aafacfd9073172a9fbf6dac1c5234a899c44 /src/core/execute.c
parent5269eb6b32f662d21638e54bb13171a5b97fe58f (diff)
execute: invalidate idle pipe after use
Not strictly necessary, but makes clear the fds are invalidated. Make sure we do the same here as in most other cases.
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index d1acda6682..8773d9cdfb 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1160,8 +1160,8 @@ static void do_idle_pipe_dance(int idle_pipe[4]) {
assert(idle_pipe);
- safe_close(idle_pipe[1]);
- safe_close(idle_pipe[2]);
+ idle_pipe[1] = safe_close(idle_pipe[1]);
+ idle_pipe[2] = safe_close(idle_pipe[2]);
if (idle_pipe[0] >= 0) {
int r;
@@ -1176,11 +1176,11 @@ static void do_idle_pipe_dance(int idle_pipe[4]) {
fd_wait_for_event(idle_pipe[0], POLLHUP, IDLE_TIMEOUT2_USEC);
}
- safe_close(idle_pipe[0]);
+ idle_pipe[0] = safe_close(idle_pipe[0]);
}
- safe_close(idle_pipe[3]);
+ idle_pipe[3] = safe_close(idle_pipe[3]);
}
static int build_environment(