summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-03 23:20:56 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-05 03:29:24 +0200
commit7862f62de3d5e71a63391e6ce7ecaee080bc6a2d (patch)
tree749a3af37595e0799b4f2cf521b7647bdcd00124
parentccaa61498c7932cbd5c91540841840266914b10e (diff)
util: explicitly turn of O_CLOEXEC for stdin/stdout/stderr
-rw-r--r--src/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index ca769c22e6..344b869c8c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2947,6 +2947,10 @@ int make_stdio(int fd) {
if (r < 0 || s < 0 || t < 0)
return -errno;
+ fd_cloexec(STDIN_FILENO, false);
+ fd_cloexec(STDOUT_FILENO, false);
+ fd_cloexec(STDERR_FILENO, false);
+
return 0;
}