diff options
author | Matthew King <chohag@jtan.com> | 2016-06-28 09:35:41 +0300 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-09-26 13:37:44 +0200 |
commit | a92bf4af66f8b5a2e6bc28baa6670065ce76daf2 (patch) | |
tree | 12861d870ab05cb735704705096f5b6f2e4b34f7 /src/init.cpp | |
parent | 37871f216e0d9463f456b8b014b80cc064011351 (diff) |
bitcoind: Daemonize using daemon(3)
Simplified version of #8278. Assumes that every OS that (a) is supported
by Bitcoin Core (b) supports daemonization has the `daemon()` function
in its C library.
- Removes the fallback path for operating systems that support
daemonization but not `daemon()`. This prevents never-exercised code from
ending up in the repository (see discussion here:
https://github.com/bitcoin/bitcoin/pull/8278#issuecomment-242704745).
- Removes the windows-specific path. Windows doesn't support `daemon()`,
so it don't support daemonization there, automatically.
Original code by Matthew King, adapted by Wladimir van der Laan.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 75182345ee..3c4466b853 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -324,7 +324,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), BITCOIN_CONF_FILENAME)); if (mode == HMM_BITCOIND) { -#ifndef WIN32 +#if HAVE_DECL_DAEMON strUsage += HelpMessageOpt("-daemon", _("Run in the background as a daemon and accept commands")); #endif } |