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 ca769c2..344b869 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;
 }