supervise-daemon: mark all open file descriptors FD_CLOEXEC
This commit is contained in:
parent
47cf1d0c70
commit
96c8ba2fb5
@ -322,7 +322,7 @@ static void child_process(char *exec, char **argv)
|
|||||||
dup2(stderr_fd, STDERR_FILENO);
|
dup2(stderr_fd, STDERR_FILENO);
|
||||||
|
|
||||||
for (i = getdtablesize() - 1; i >= 3; --i)
|
for (i = getdtablesize() - 1; i >= 3; --i)
|
||||||
close(i);
|
fcntl(i, F_SETFD, FD_CLOEXEC);
|
||||||
|
|
||||||
*cmdline = '\0';
|
*cmdline = '\0';
|
||||||
c = argv;
|
c = argv;
|
||||||
|
Loading…
Reference in New Issue
Block a user