diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2017-04-29 13:48:45 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2017-04-29 13:48:45 -0500 |
commit | 96c8ba2fb5f91a711ef5bfcfd8affe0b74ad18fe (patch) | |
tree | a35ebb42f032f6f09de6a21fcee4caaa3eddff0a | |
parent | 47cf1d0c707dc88d216bebc15be3f39d5eb47fa9 (diff) |
supervise-daemon: mark all open file descriptors FD_CLOEXEC
-rw-r--r-- | src/rc/supervise-daemon.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |