aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-06-11 07:40:14 +0200
committerLuke Dashjr <luke-jr+git@utopios.org>2012-06-14 17:32:45 +0000
commit0b1fda6f6542a309d59f511ab1c417f891a7237b (patch)
tree2aeed52e1a7f59593210e7d9f008cb8917c8328e /src
parenta973e225e7d837b098b32f728008ef17b8e1a8e1 (diff)
downloadbitcoin-0b1fda6f6542a309d59f511ab1c417f891a7237b.tar.xz
Don't call exit() in Shutdown() for Bitcoin-Qt (fixes a tray-icon issue)
(partial of 9247134eaba9a1d0fa74f22de238af1476663005)
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp3
-rw-r--r--src/qt/bitcoin.cpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 5f1e4f5307..6b6a743af9 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -66,7 +66,10 @@ void Shutdown(void* parg)
Sleep(50);
printf("Bitcoin exiting\n\n");
fExit = true;
+#ifndef QT_GUI
+ // ensure non UI client get's exited here, but let Bitcoin-Qt reach return 0; in bitcoin.cpp
exit(0);
+#endif
}
else
{
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 3157eadef8..8dde8f3b29 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -208,6 +208,7 @@ int main(int argc, char *argv[])
window.hide();
guiref = 0;
}
+ // Shutdown the core and it's threads, but don't exit Bitcoin-Qt here
Shutdown(NULL);
}
else