diff options
author | Max Kellermann <max@duempel.org> | 2014-01-18 11:46:28 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-18 11:46:28 +0100 |
commit | 56c12bd1eae4318c1eae7cfed0196b886a35c918 (patch) | |
tree | 90b9ee45810e117844ac92a83e68747dc013c6ee /src/Daemon.cxx | |
parent | 3a6da7c594b89cf24f3437597d5025f5a17277de (diff) | |
download | mpd-56c12bd1eae4318c1eae7cfed0196b886a35c918.tar.gz mpd-56c12bd1eae4318c1eae7cfed0196b886a35c918.tar.xz mpd-56c12bd1eae4318c1eae7cfed0196b886a35c918.zip |
Daemon: don't use daemon(), always require fork()
Prepare for more advanced daemonization code, which will not work with
daemon(). Let's just require fork(). Everybody who supports daemon()
also supports fork().
Diffstat (limited to 'src/Daemon.cxx')
-rw-r--r-- | src/Daemon.cxx | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/Daemon.cxx b/src/Daemon.cxx index b7c7554c1..2425e74c4 100644 --- a/src/Daemon.cxx +++ b/src/Daemon.cxx @@ -137,13 +137,6 @@ daemonize_detach(void) fflush(nullptr); -#ifdef HAVE_DAEMON - - if (daemon(0, 1)) - FatalSystemError("daemon() failed"); - -#elif defined(HAVE_FORK) - /* detach from parent process */ switch (fork()) { @@ -165,10 +158,6 @@ daemonize_detach(void) setsid(); -#else - FatalError("no support for daemonizing"); -#endif - LogDebug(daemon_domain, "daemonized"); } |