From 7862f62de3d5e71a63391e6ce7ecaee080bc6a2d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 3 Jul 2011 23:20:56 +0200 Subject: [PATCH] util: explicitly turn of O_CLOEXEC for stdin/stdout/stderr --- src/util.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.39.5