diff options
author | Matt Corallo <matt@bluematt.me> | 2012-06-28 15:52:45 +0200 |
---|---|---|
committer | Matt Corallo <matt@bluematt.me> | 2012-06-28 15:52:45 +0200 |
commit | 18c4beb05b494f30b16a17b834c23ec8774749b2 (patch) | |
tree | cc405a7fc106dd50b0034a4bde09504fc6379876 /src/init.cpp | |
parent | e75acc006e8bc5c44d1d6e6c3b027fe28d8c743b (diff) |
Revert "*Always* send a shutdown signal to enable custom shutdown actions"
This reverts commit 896899e0d66e25f6549a92749d237c8a87b12f08.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp index bb93342631..b25d52200f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -9,7 +9,6 @@ #include "init.h" #include "util.h" #include "ui_interface.h" -#include <boost/bind.hpp> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/filesystem/convenience.hpp> @@ -41,8 +40,13 @@ void ExitTimeout(void* parg) void StartShutdown() { +#ifdef QT_GUI // ensure we leave the Qt main loop for a clean GUI exit (Shutdown() is called in bitcoin.cpp afterwards) uiInterface.QueueShutdown(); +#else + // Without UI, Shutdown() can simply be started in a new thread + CreateThread(Shutdown, NULL); +#endif } void Shutdown(void* parg) @@ -150,11 +154,6 @@ bool AppInit(int argc, char* argv[]) exit(ret); } - // Create the shutdown thread when receiving a shutdown signal - boost::signals2::scoped_connection do_stop( - uiInterface.QueueShutdown.connect(boost::bind( - &CreateThread, &Shutdown, static_cast<void*>(0), false))); - fRet = AppInit2(); } catch (std::exception& e) { |