diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/start-stop-daemon/start-stop-daemon.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/start-stop-daemon/start-stop-daemon.c b/src/start-stop-daemon/start-stop-daemon.c index ef6f454e..3e4a19a1 100644 --- a/src/start-stop-daemon/start-stop-daemon.c +++ b/src/start-stop-daemon/start-stop-daemon.c @@ -1098,12 +1098,7 @@ int main(int argc, char **argv) || rc_yesno(getenv("EINFO_QUIET"))) dup2(stderr_fd, STDERR_FILENO); -#ifdef HAVE_CLOSEFROM - closefrom(3); -#else - for (i = getdtablesize() - 1; i >= 3; --i) - close(i); -#endif + cloexec_fds_from(3); if (scheduler != NULL) { int scheduler_index; |