mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 18:22:33 +02:00
bitcoind: Add -daemonwait option to wait for initialization
This adds a `-daemonwait` flag that does the same as `-daemon` except it, from a user perspective, backgrounds the process only after initialization is complete. This can be useful when the process launching bitcoind wants to guarantee that either the RPC server is running, or that initialization failed, before continuing. The exit code indicates the initialization result. This replaces the use of the libc function `daemon()` by a custom implementation which is inspired by the glibc implementation, but also creates a pipe from the child to the parent process for communication. An additional advantage of having our own `daemon()` implementation is that no MACOS-specific pragmas are needed anymore to silence a deprecation warning.
This commit is contained in:
@ -92,9 +92,9 @@
|
||||
don't. */
|
||||
#define HAVE_DECL_BSWAP_64 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `daemon', and to 0 if you don't.
|
||||
/* Define to 1 if you have the declaration of `fork', and to 0 if you don't.
|
||||
*/
|
||||
#define HAVE_DECL_DAEMON 0
|
||||
#define HAVE_DECL_FORK 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `htobe16', and to 0 if you
|
||||
don't. */
|
||||
@ -132,6 +132,10 @@
|
||||
don't. */
|
||||
#define HAVE_DECL_LE64TOH 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `setsid', and to 0 if you don't.
|
||||
*/
|
||||
#define HAVE_DECL_SETSID 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_STRERROR_R 0
|
||||
|
Reference in New Issue
Block a user