aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-06-01 14:51:46 +0200
committersapier <Sapier at GMX dot net>2014-06-01 14:51:46 +0200
commit75ddf4d221301bea206311df4834903c64c566c1 (patch)
tree1c62e83179138e77a013f29a4069a7ce2a58c4d0 /src
parentc5f00c38da336ed929a5b1613a4b2e7fef42adbe (diff)
downloadminetest-75ddf4d221301bea206311df4834903c64c566c1.tar.gz
minetest-75ddf4d221301bea206311df4834903c64c566c1.tar.bz2
minetest-75ddf4d221301bea206311df4834903c64c566c1.zip
Revert "Redirect stdin/stderr/stdout to /dev/null in daemon mode"
Remove daemon support due to delayed popular vote (part 1)
Diffstat (limited to 'src')
-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;
}