bitcoind: Daemonize using daemon(3)#8813
Conversation
src/bitcoind.cpp
Outdated
There was a problem hiding this comment.
Two more lines that can be deleted, thanks.
a7ca7c8 to
dbd66f1
Compare
Simplified version of bitcoin#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: bitcoin#8278 (comment)). - 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.
dbd66f1 to
a92bf4a
Compare
|
Tested ACK (OSX) a92bf4a. |
|
Possibly related: #4676 (haven't checked) |
|
Concept ACK. |
a92bf4a bitcoind: Daemonize using daemon(3) (Matthew King)
|
Note: if you end up here seeing the "Error: -daemon is not supported on this operating system" message while your OS does support it, this most likely means you need to re-run autogen.sh and configure. |
|
This brings new warning on OS X: |
|
You can't be friggin serious. |
|
@paveljanik Just curious do they suggest anything to use instead of daemon? |
|
I wouldn't take the deprecation warning to serious. |
|
Apparently they recommend doing something Apple-specific with plists and such https://developer.apple.com/library/content/technotes/tn2083/_index.html#//%20apple_ref/doc/uid/DTS10003794-CH1-SUBSECTION64 |
|
I agree with @jonasschnelli. No need to revert this. This only shows how Apple deprecates stuff. What is the current status of daemon in the current macOS? |
Simplified version of bitcoin#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: bitcoin#8278 (comment)). - 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. Github-Pull: bitcoin#8813 Rebased-From: a92bf4a
a92bf4a bitcoind: Daemonize using daemon(3) (Matthew King)
a92bf4a bitcoind: Daemonize using daemon(3) (Matthew King)

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.daemon(). This prevents never-exercised code from ending up in the repository (see discussion here:Forking daemon #8278 (comment)).
daemon(), so it doesn't support daemonization there, automatically. Give an explicit error if a user specifies-daemonon an OS where this is not supported.HAVE_DECL_DAEMONinstead of!WIN32.The original problem reported in #8278 was "When started with cron, the sendmail process hung around waiting for its stdin, bitcoind's stdout/err, to close..".