mirror of
https://github.com/minetest/minetest.git
synced 2024-11-24 00:23:46 +01:00
Revert "Redirect stdin/stderr/stdout to /dev/null in daemon mode"
Remove daemon support due to delayed popular vote (part 1)
This commit is contained in:
parent
c5f00c38da
commit
75ddf4d221
@ -635,7 +635,6 @@ void daemonize()
|
|||||||
pidfile = 0;
|
pidfile = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pid_t pid = fork();
|
pid_t pid = fork();
|
||||||
|
|
||||||
if (pid > 0) {
|
if (pid > 0) {
|
||||||
@ -649,9 +648,8 @@ void daemonize()
|
|||||||
}
|
}
|
||||||
exit (0);
|
exit (0);
|
||||||
} else if (pid == 0) {
|
} else if (pid == 0) {
|
||||||
freopen("/dev/null","w",stdout);
|
fclose(stdout);
|
||||||
freopen("/dev/null","w",stderr);
|
fclose(stderr);
|
||||||
freopen("/dev/null","r",stdout);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user