From: sapier Date: Sun, 1 Jun 2014 12:51:46 +0000 (+0200) Subject: Revert "Redirect stdin/stderr/stdout to /dev/null in daemon mode" X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=75ddf4d221301bea206311df4834903c64c566c1;p=zefram%2Fminetest%2Fminetest_engine.git Revert "Redirect stdin/stderr/stdout to /dev/null in daemon mode" Remove daemon support due to delayed popular vote (part 1) --- diff --git a/src/porting.cpp b/src/porting.cpp index ca43452a..ef461242 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; }