Skip to content

Commit

Permalink
Fix theoretical race in signal handler
Browse files Browse the repository at this point in the history
  • Loading branch information
rbx authored and dennisklein committed Sep 20, 2018
1 parent c4145e9 commit f6c1f5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fairmq/plugins/Control.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
#include <poll.h> // for the interactive mode
#include <csignal> // catching system signals
#include <functional>
#include <atomic>

using namespace std;

namespace
{
volatile sig_atomic_t gSignalStatus = 0;
std::atomic<sig_atomic_t> gSignalStatus(0);

extern "C" auto signal_handler(int signal) -> void
{
Expand Down

0 comments on commit f6c1f5d

Please sign in to comment.