From 75ddf4d221301bea206311df4834903c64c566c1 Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 1 Jun 2014 14:51:46 +0200 Subject: Revert "Redirect stdin/stderr/stdout to /dev/null in daemon mode" Remove daemon support due to delayed popular vote (part 1) --- src/porting.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3