Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
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

namespace  Utopia
 

Functions

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

Variables

std::atomic< boolUtopia::stop_now
 The flag indicating whether to stop whatever is being done right now.
 
std::atomic< intUtopia::received_signum
 The received signal value.