...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <csignal> static void sig_handler(int sig) { // Implementation details elided. } void finstall_signal_handler() { if (SIG_ERR == std::signal(SIGTERM, sig_handler)) { // Handle error } } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <csignal> extern "C" void sig_handler(int sig) { // Implementation details elided. } void finstall_signal_handler() { if (SIG_ERR == std::signal(SIGTERM, sig_handler)) { // Handle error } } |
...