diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c index 2a24799c..2080e4a6 100644 --- a/src/rc/supervise-daemon.c +++ b/src/rc/supervise-daemon.c @@ -322,7 +322,7 @@ static void child_process(char *exec, char **argv) dup2(stderr_fd, STDERR_FILENO); for (i = getdtablesize() - 1; i >= 3; --i) - close(i); + fcntl(i, F_SETFD, FD_CLOEXEC); *cmdline = '\0'; c = argv;