X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Futil.h;h=028538e9ae4349ac305756da2608718b10958c6e;hb=b90c9ecb132ad686275afafe506f8044719245ec;hp=7ac36c0f4ac238e4dba44d44d3e938970a170d12;hpb=d4211176208b5e4ae4a699c6ce3239447752cdb2;p=novacoin.git diff --git a/src/util.h b/src/util.h index 7ac36c0..028538e 100644 --- a/src/util.h +++ b/src/util.h @@ -1,4 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UTIL_H @@ -621,7 +622,10 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa return (pthread_t)0; } if (!fWantHandle) + { + pthread_detach(hthread); return (pthread_t)-1; + } return hthread; }