diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-10-09 23:16:24 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-10-09 23:16:24 +0000 |
commit | cef36fad891fba0fd8f5aec73bb17135b7fb133a (patch) | |
tree | 43eeae2dd9003ae894603bbb315ee2c3e40b9097 /src | |
parent | a7642282f6465f2d9e2091ec6279fa1db1241cf3 (diff) | |
parent | b3f8f6ab9409d3e901d22c09b0346a5a47779496 (diff) | |
download | bitcoin-cef36fad891fba0fd8f5aec73bb17135b7fb133a.tar.xz |
Merge branch '0.4.x' into 0.5.x
Conflicts:
src/bitcoinrpc.cpp
src/init.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/bitcoinrpc.cpp | 2 | ||||
-rw-r--r-- | src/init.cpp | 2 | ||||
-rw-r--r-- | src/util.cpp | 10 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 9c9ff255d7..7cee356179 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1589,7 +1589,7 @@ Value encryptwallet(const Array& params, bool fHelp) // slack space in .dat files; that is bad if the old data is // unencrypted private keys. So: StartShutdown(); - return "wallet encrypted; bitcoin server stopping, restart to run with encrypted wallet"; + return "wallet encrypted; bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; } diff --git a/src/init.cpp b/src/init.cpp index b3c49f3a63..0c20be976a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -259,7 +259,7 @@ bool AppInit2(int argc, char* argv[]) // On Windows, show a message box, as there is no stderr wxMessageBox(strUsage, "Usage"); #else - fprintf(stderr, "%s", strUsage.c_str()); + fprintf(stdout, "%s", strUsage.c_str()); #endif return false; } diff --git a/src/util.cpp b/src/util.cpp index d496a44d2d..61257e667e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -194,8 +194,14 @@ inline int OutputDebugStringF(const char* pszFormat, ...) if (fileout) { static bool fStartedNewLine = true; - static boost::mutex mutexDebugLog; - boost::mutex::scoped_lock scoped_lock(mutexDebugLog); + + // This routine may be called by global destructors during shutdown. + // Since the order of destruction of static/global objects is undefined, + // allocate mutexDebugLog on the heap the first time this routine + // is called to avoid crashes during shutdown. + static boost::mutex* mutexDebugLog = NULL; + if (mutexDebugLog == NULL) mutexDebugLog = new boost::mutex(); + boost::mutex::scoped_lock scoped_lock(*mutexDebugLog); // Debug print useful for profiling if (fLogTimestamps && fStartedNewLine) |