21#ifndef SIGNAL_HANDLER_HPP
22#define SIGNAL_HANDLER_HPP
35 struct sigaction old_action;
50 struct sigaction new_action;
51 new_action.sa_handler = handler;
52 sigemptyset(&new_action.sa_mask);
53 new_action.sa_flags = 0;
55 if (sigaction(SIGINT, &new_action, &old_action) < 0) {
66 if (sigaction(SIGINT, &old_action,
nullptr) < 0) {
RAII guard for signal handling.
SignalHandler & operator=(SignalHandler &&)=delete
SignalHandler(SignalHandler const &)=delete
SignalHandler(int signal, void(*handler)(int))
Constructor.
SignalHandler & operator=(SignalHandler const &)=delete
~SignalHandler()
Destructor.
SignalHandler(SignalHandler &&)=delete
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
#define runtimeErrorMsg()