aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2017-04-29 13:48:45 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-04-29 13:48:45 -0500
commit96c8ba2fb5f91a711ef5bfcfd8affe0b74ad18fe (patch)
treea35ebb42f032f6f09de6a21fcee4caaa3eddff0a
parentsupervise-daemon:remove the controlling tty in the supervisor (diff)
downloadopenrc-master.zip
openrc-master.tar.gz
openrc-master.tar.bz2
supervise-daemon: mark all open file descriptors FD_CLOEXECHEADmaster
-rw-r--r--src/rc/supervise-daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index 2a24799..2080e4a 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;