From: Lennart Poettering Date: Sun, 3 Jul 2011 21:20:56 +0000 (+0200) Subject: util: explicitly turn of O_CLOEXEC for stdin/stdout/stderr X-Git-Tag: v30~55 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7862f62de3d5e71a63391e6ce7ecaee080bc6a2d;p=systemd util: explicitly turn of O_CLOEXEC for stdin/stdout/stderr --- diff --git a/src/util.c b/src/util.c index ca769c22..344b869c 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; }