diff --git a/src/switch.c b/src/switch.c index 745c292d73..a4ba10b868 100644 --- a/src/switch.c +++ b/src/switch.c @@ -336,7 +336,6 @@ static void daemonize(int *fds) if (fds) { setsid(); } - return; /* redirect std* to null */ fd = open("/dev/null", O_RDONLY); if (fd != 0) { @@ -355,6 +354,7 @@ static void daemonize(int *fds) dup2(fd, 2); close(fd); } + return; } #endif