From 26f07f835c55acc44c90a1626f0738a5e78aef86 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 12 May 2016 11:45:49 +0200 Subject: [PATCH] Merge #8004: signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3262316 fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (Chirag Davé) --- src/init.cpp | 2 +- src/util.cpp | 2 +- src/util.h | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 7dba1a2d2..4d57d1268 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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() { diff --git a/src/util.cpp b/src/util.cpp index 3c15151f6..d25f3b866 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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 */ diff --git a/src/util.h b/src/util.h index 6d582f8d1..6e391aa11 100644 --- a/src/util.h +++ b/src/util.h @@ -30,6 +30,10 @@ #include #include +#ifndef WIN32 +#include +#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;