projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5f00c3
)
Revert "Redirect stdin/stderr/stdout to /dev/null in daemon mode"
author
sapier
<Sapier at GMX dot net>
Sun, 1 Jun 2014 12:51:46 +0000
(14:51 +0200)
committer
sapier
<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
patch
|
blob
|
history
diff --git
a/src/porting.cpp
b/src/porting.cpp
index ca43452a85439f56d494518fefc0eb008e0adedd..ef461242d28cad1afb37e34c889d3d9df55cfe71 100644
(file)
--- 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;
}