chiark / gitweb /
util: explicitly turn of O_CLOEXEC for stdin/stdout/stderr
authorLennart Poettering <lennart@poettering.net>
Sun, 3 Jul 2011 21:20:56 +0000 (23:20 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Jul 2011 01:29:24 +0000 (03:29 +0200)
src/util.c

index ca769c22e6a62b2cbdd5956f5835435acf59a052..344b869c8cb796f66b977fdda25ec549f0833703 100644 (file)
@@ -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;
 }