SHOGUN
v1.1.0
|
Class Signal implements signal handling to e.g. allow ctrl+c to cancel a long running process.
This is done in two ways:
Public Member Functions | |
CSignal () | |
virtual | ~CSignal () |
virtual const char * | get_name () const |
Static Public Member Functions | |
static void | handler (int signal) |
static bool | set_handler () |
static bool | unset_handler () |
static void | clear () |
static void | clear_cancel () |
static void | set_cancel (bool immediately=false) |
static bool | cancel_computations () |
Static Protected Attributes | |
static int | signals [NUMTRAPPEDSIGS] = {SIGINT, SIGURG} |
static struct sigaction | oldsigaction [NUMTRAPPEDSIGS] |
static bool | active = false |
static bool | cancel_computation = false |
static bool | cancel_immediately = false |
CSignal | ( | ) |
default constructor
Definition at line 30 of file Signal.cpp.
~CSignal | ( | ) | [virtual] |
Definition at line 35 of file Signal.cpp.
static bool cancel_computations | ( | ) | [static] |
void clear | ( | ) | [static] |
clear signals
Definition at line 142 of file Signal.cpp.
void clear_cancel | ( | ) | [static] |
clear cancel flag signals
Definition at line 128 of file Signal.cpp.
virtual const char* get_name | ( | ) | const [virtual] |
void handler | ( | int | signal | ) | [static] |
void set_cancel | ( | bool | immediately = false | ) | [static] |
set cancel flag signals
Definition at line 134 of file Signal.cpp.
bool set_handler | ( | ) | [static] |
bool unset_handler | ( | ) | [static] |
bool active = false [static, read, protected] |
bool cancel_computation = false [static, protected] |
bool cancel_immediately = false [static, protected] |
struct sigaction oldsigaction[NUMTRAPPEDSIGS] [static, protected] |
int signals = {SIGINT, SIGURG} [static, protected] |