![]() |
Scarab
v2.9.1
Project 8 C++ Utility Library
|
#include <signal_handler.hh>
Public Member Functions | |
| signal_handler () | |
| virtual | ~signal_handler () |
| void | add_cancelable (cancelable *a_cancelable) |
| Add a cancelable object. More... | |
| void | remove_cancelable (cancelable *a_cancelable) |
| Remove a cancelable object. More... | |
| void | reset () |
| Remove all cancelables. More... | |
Static Public Member Functions | |
| static bool | got_exit_signal () |
| Check whether an exit signal has been received. More... | |
| static void | handler_cancel_threads (int _ignored) |
| Signal handler function. More... | |
| static void | cancel_all (int a_code) |
| Asynchronous call to exit the process with the given exit code. More... | |
Private Types | |
| typedef std::set< cancelable *> | cancelers |
| typedef cancelers::const_iterator | cancelers_cit_t |
| typedef cancelers::iterator | cancelers_it_t |
Static Private Member Functions | |
| static void | print_message () |
Static Private Attributes | |
| static cancelers | f_cancelers |
| static std::mutex | f_mutex |
| static bool | f_got_exit_signal = false |
| static bool | f_handling_sig_quit = false |
| static bool | f_handling_sig_int = false |
Definition at line 21 of file signal_handler.hh.
|
private |
Definition at line 47 of file signal_handler.hh.
|
private |
Definition at line 48 of file signal_handler.hh.
|
private |
Definition at line 49 of file signal_handler.hh.
| signal_handler | ( | ) |
Definition at line 36 of file signal_handler.cc.
|
virtual |
Definition at line 66 of file signal_handler.cc.
| void add_cancelable | ( | scarab::cancelable * | a_cancelable | ) |
Add a cancelable object.
Definition at line 70 of file signal_handler.cc.
|
static |
Asynchronous call to exit the process with the given exit code.
Definition at line 110 of file signal_handler.cc.
|
static |
Check whether an exit signal has been received.
Definition at line 97 of file signal_handler.cc.
|
static |
Signal handler function.
Definition at line 102 of file signal_handler.cc.
|
staticprivate |
| void remove_cancelable | ( | scarab::cancelable * | a_cancelable | ) |
Remove a cancelable object.
Definition at line 78 of file signal_handler.cc.
| void reset | ( | ) |
Remove all cancelables.
Definition at line 86 of file signal_handler.cc.
|
staticprivate |
Definition at line 51 of file signal_handler.hh.
|
staticprivate |
Definition at line 54 of file signal_handler.hh.
|
staticprivate |
Definition at line 57 of file signal_handler.hh.
|
staticprivate |
Definition at line 56 of file signal_handler.hh.
|
staticprivate |
Definition at line 52 of file signal_handler.hh.
1.8.13