gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool
signal_handling.hpp File Reference

GAMBIT signal handling functions. More...

#include <signal.h>
#include <chrono>
#include <setjmp.h>
#include "yaml-cpp/yaml.h"
#include "exceptions.hpp"
#include "local_info.hpp"
#include "gambit/Utils/mpiwrapper.hpp"
Include dependency graph for signal_handling.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  Gambit::SignalData
 Variables for use in signal handlers. More...


 TODO: see if we can use this one:


std::string Gambit::signal_name (int sig)
 Translate signal codes to strings. More...
EXPORT_SYMBOLS SignalData & Gambit::signaldata ()
 Retrieve global instance of signal handler options struct. More...
void Gambit::set_signal_handler (const YAML::Node &keyvalnode, const int sig, const std::string &def_mode)
 Choose signal handler for a given signal via yaml file option. More...
void Gambit::sighandler_soft (int sig)
 Signal handler functions. More...

Detailed Description

GAMBIT signal handling functions.

I have tried to make these standards conformant, however I suspect that they are not, and the emergency signal handlers definitely are not. Nevertheless, they seem to work well, and the emergency shutdown handlers are intended for emergencies only (when a clean shutdown is not possible), so non-conformance is the least of our problems in that situation. The "soft" shutdown handler should be at least very close to conformant I think, though there are some more steps that could be taken to improve this if it turns out to be an issue.

Authors (add name and date if you modify):

Ben Farmer (
2015 Oct

Definition in file signal_handling.hpp.