From 96c8ba2fb5f91a711ef5bfcfd8affe0b74ad18fe Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sat, 29 Apr 2017 13:48:45 -0500 Subject: supervise-daemon: mark all open file descriptors FD_CLOEXEC --- src/rc/supervise-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3