#include <csignal>
#include <functional>
#include <iostream>
Go to the source code of this file.
◆ SignalHandler
◆ activate_signal_handling()
| void activate_signal_handling |
( |
SignalHandler | handler, |
|
|
int | signal = SIGINT ) |
Definition at line 41 of file python_signal.h.
41 {
43 custom_handler = std::move(handler);
46}
static SignalHandler * custom_handler_ptr
std::function< void(int)> SignalHandler
void signal_dispatcher(int signum)
◆ restore_default_signal_handling()
| void restore_default_signal_handling |
( |
int | signal = SIGINT | ) |
|
Definition at line 49 of file python_signal.h.
49 {
50 std::signal(signal, SIG_DFL);
51}
◆ signal_dispatcher()
| void signal_dispatcher |
( |
int | signum | ) |
|
Definition at line 34 of file python_signal.h.
34 {
36 (*custom_handler_ptr)(signum);
37 }
38}
◆ custom_handler_ptr