Gavin Andresen: clean shutdown on SIGTERM

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@149 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
s_nakamoto
2010-09-08 19:24:32 +00:00
parent 8c9479c6bb
commit 14002c8eba
5 changed files with 18 additions and 1 deletions

View File

@@ -1163,6 +1163,8 @@ void ThreadMessageHandler2(void* parg)
// Wait and allow messages to bunch up
vnThreadsRunning[2]--;
Sleep(100);
if (fRequestShutdown)
Shutdown(NULL);
vnThreadsRunning[2]++;
if (fShutdown)
return;