aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthew King <chohag@jtan.com>2016-06-28 09:35:41 +0300
committerWladimir J. van der Laan <laanwj@gmail.com>2016-09-26 13:37:44 +0200
commita92bf4af66f8b5a2e6bc28baa6670065ce76daf2 (patch)
tree12861d870ab05cb735704705096f5b6f2e4b34f7 /configure.ac
parent37871f216e0d9463f456b8b014b80cc064011351 (diff)
downloadbitcoin-a92bf4af66f8b5a2e6bc28baa6670065ce76daf2.tar.xz
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 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 25b828f18c..e129b58461 100644
--- a/configure.ac
+++ b/configure.ac
@@ -508,6 +508,9 @@ AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define
AC_CHECK_DECLS([strnlen])
+# Check for daemon(3), unrelated to --with-daemon (although used by it)
+AC_CHECK_DECLS([daemon])
+
AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,,
[#if HAVE_ENDIAN_H
#include <endian.h>