From a07c294e3d8242c98e6ada199268fde6bad1574b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 17 Oct 2009 22:00:40 +0200 Subject: dfork: close all fds >=3, including 3 itself --- libdaemon/dfork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdaemon/dfork.c b/libdaemon/dfork.c index e705155..2f57f1c 100644 --- a/libdaemon/dfork.c +++ b/libdaemon/dfork.c @@ -515,7 +515,7 @@ int daemon_close_allv(const int except_fds[]) { return -1; } - if (fd <= 3) + if (fd < 3) continue; if (fd == dirfd(d)) -- cgit