Utopia  2
Framework for studying models of complex & adaptive systems.
Namespaces | Functions | Variables
signal.hh File Reference
#include <csignal>
#include <atomic>
Include dependency graph for signal.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Utopia
 

Functions

void Utopia::default_signal_handler (int signum)
 Default signal handler function, only setting the stop_now global flag. More...
 
template<typename Handler >
void Utopia::attach_signal_handler (int signum, Handler &&handler)
 Attaches a signal handler for the given signal via sigaction. More...
 
void Utopia::attach_signal_handler (int signum)
 Attaches the default signal handler for the given signal. More...
 

Variables

std::atomic< bool > Utopia::stop_now
 The flag indicating whether to stop whatever is being done right now. More...
 
std::atomic< int > Utopia::received_signum
 The received signal value. More...