aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/porting.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/porting.cpp b/src/porting.cpp
index ca43452a8..ef461242d 100644
--- a/src/porting.cpp
+++ b/src/porting.cpp
@@ -635,7 +635,6 @@ void daemonize()
pidfile = 0;
}
-
pid_t pid = fork();
if (pid > 0) {
@@ -649,9 +648,8 @@ void daemonize()
}
exit (0);
} else if (pid == 0) {
- freopen("/dev/null","w",stdout);
- freopen("/dev/null","w",stderr);
- freopen("/dev/null","r",stdout);
+ fclose(stdout);
+ fclose(stderr);
return;
}