Merge #8004: signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t

3262316 fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (Chirag Davé)
This commit is contained in:
Wladimir J. van der Laan 2016-05-12 11:45:49 +02:00 committed by Alexander Block
parent f0fe21d372
commit 26f07f835c
3 changed files with 7 additions and 3 deletions

View File

@ -158,7 +158,7 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
// shutdown thing.
//
volatile bool fRequestShutdown = false;
volatile sig_atomic_t fRequestShutdown = false;
void StartShutdown()
{

View File

@ -131,7 +131,7 @@ bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS;
bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS;
bool fLogThreadNames = DEFAULT_LOGTHREADNAMES;
bool fLogIPs = DEFAULT_LOGIPS;
volatile bool fReopenDebugLog = false;
volatile sig_atomic_t fReopenDebugLog = false;
CTranslationInterface translationInterface;
/** Init OpenSSL library multithreading support */

View File

@ -30,6 +30,10 @@
#include <boost/signals2/signal.hpp>
#include <boost/thread/exceptions.hpp>
#ifndef WIN32
#include <signal.h>
#endif
// Debugging macros
// Uncomment the following line to enable debugging messages
@ -71,7 +75,7 @@ extern bool fLogTimestamps;
extern bool fLogTimeMicros;
extern bool fLogThreadNames;
extern bool fLogIPs;
extern volatile bool fReopenDebugLog;
extern volatile sig_atomic_t fReopenDebugLog;
extern CTranslationInterface translationInterface;
extern const char * const BITCOIN_CONF_FILENAME;