diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-08 14:35:02 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-08 14:42:07 +0100 |
commit | 549e69a558a045829d2910c5d172e91f49101a31 (patch) | |
tree | 307aa78abcf9d1f5c76e061c597029722aa283fd /src/bitcoind.cpp | |
parent | d696820b45d9b6be1c21a65f2c8ed3b260938cb7 (diff) | |
parent | 8b9adca4461d0cb6bdfca7b74228d430b9b9d116 (diff) | |
download | bitcoin-549e69a558a045829d2910c5d172e91f49101a31.tar.xz |
Merge pull request #3449
8b9adca Allow `-noserver` with bitcoind (Wladimir J. van der Laan)
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r-- | src/bitcoind.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index de71fde9bc..5d87218844 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -30,6 +30,8 @@ * Use the buttons <code>Namespaces</code>, <code>Classes</code> or <code>Files</code> at the top of the page to start navigating the code. */ +static bool fDaemon; + void DetectShutdownThread(boost::thread_group* threadGroup) { bool fShutdown = ShutdownRequested(); @@ -108,6 +110,8 @@ bool AppInit(int argc, char* argv[]) fDaemon = GetBoolArg("-daemon", false); if (fDaemon) { + fprintf(stdout, "Bitcoin server starting\n"); + // Daemonize pid_t pid = fork(); if (pid < 0) @@ -127,9 +131,10 @@ bool AppInit(int argc, char* argv[]) fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno); } #endif + SoftSetBoolArg("-server", true); detectShutdownThread = new boost::thread(boost::bind(&DetectShutdownThread, &threadGroup)); - fRet = AppInit2(threadGroup, true); + fRet = AppInit2(threadGroup); } catch (std::exception& e) { PrintExceptionContinue(&e, "AppInit()"); |