Skip to content

Commit 2efe38b

Browse files
committed
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é)
2 parents 5b736dd + 3262316 commit 2efe38b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
123123
// shutdown thing.
124124
//
125125

126-
volatile bool fRequestShutdown = false;
126+
volatile sig_atomic_t fRequestShutdown = false;
127127

128128
void StartShutdown()
129129
{

src/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ string strMiscWarning;
113113
bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS;
114114
bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS;
115115
bool fLogIPs = DEFAULT_LOGIPS;
116-
volatile bool fReopenDebugLog = false;
116+
volatile sig_atomic_t fReopenDebugLog = false;
117117
CTranslationInterface translationInterface;
118118

119119
/** Init OpenSSL library multithreading support */

src/util.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#include <boost/signals2/signal.hpp>
2929
#include <boost/thread/exceptions.hpp>
3030

31+
#ifndef WIN32
32+
#include <signal.h>
33+
#endif
34+
3135
static const bool DEFAULT_LOGTIMEMICROS = false;
3236
static const bool DEFAULT_LOGIPS = false;
3337
static const bool DEFAULT_LOGTIMESTAMPS = true;
@@ -50,7 +54,7 @@ extern std::string strMiscWarning;
5054
extern bool fLogTimestamps;
5155
extern bool fLogTimeMicros;
5256
extern bool fLogIPs;
53-
extern volatile bool fReopenDebugLog;
57+
extern volatile sig_atomic_t fReopenDebugLog;
5458
extern CTranslationInterface translationInterface;
5559

5660
extern const char * const BITCOIN_CONF_FILENAME;

0 commit comments

Comments
 (0)