supervise-daemon: mark all open file descriptors FD_CLOEXEC

This commit is contained in:
William Hubbs 2017-04-29 13:48:45 -05:00
parent 47cf1d0c70
commit 96c8ba2fb5

View File

@ -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;