Revert "Redirect stdin/stderr/stdout to /dev/null in daemon mode"
authorsapier <Sapier at GMX dot net>
Sun, 1 Jun 2014 12:51:46 +0000 (14:51 +0200)
committersapier <Sapier at GMX dot net>
Sun, 1 Jun 2014 12:51:46 +0000 (14:51 +0200)
Remove daemon support due to delayed popular vote (part 1)

src/porting.cpp

index ca43452a85439f56d494518fefc0eb008e0adedd..ef461242d28cad1afb37e34c889d3d9df55cfe71 100644 (file)
@@ -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;
        }