From a92bf4af66f8b5a2e6bc28baa6670065ce76daf2 Mon Sep 17 00:00:00 2001 From: Matthew King Date: Tue, 28 Jun 2016 09:35:41 +0300 Subject: 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. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') 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 -- cgit v1.2.3