Skip to content

Commit

Permalink
Revert signal handler to default once called in order to allow progra…
Browse files Browse the repository at this point in the history
…m termination if stuck
  • Loading branch information
sjanel committed Mar 10, 2024
1 parent 87e6e4b commit 571e014
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/engine/src/coincenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ volatile sig_atomic_t g_signalStatus = 0;
extern "C" void SignalHandler(int sigNum) {
log::warn("Signal {} received, will stop after current request", sigNum);
g_signalStatus = sigNum;

// Revert to standard signal handler (to allow for standard kill in case program does not react)
std::signal(sigNum, SIG_DFL);
}

using UniquePublicSelectedExchanges = ExchangeRetriever::UniquePublicSelectedExchanges;
Expand Down

0 comments on commit 571e014

Please sign in to comment.