1 #include "hmbdc/Copyright.hpp" 4 #include "hmbdc/Exception.hpp" 10 namespace hmbdc {
namespace os {
33 memset(&act, 0,
sizeof(act));
34 act.sa_sigaction = handler;
35 act.sa_flags = SA_SIGINFO;
37 if (sigaction(SIGTERM, &act, NULL) ||
38 sigaction(SIGINT, &act, NULL)) {
39 HMBDC_THROW(runtime_error,
"cannot install signal handler");
44 static function<void()> onTermInt_s;
47 handler(
int signum, siginfo_t *,
void *) {
Definition: TypedString.hpp:74
provides functions to handle signals
Definition: Signals.hpp:17
static void onTermIntDo(function< void()> doThis)
specfy what to do when SIGTERM or SIGINT is received
Definition: Signals.hpp:29
Definition: Client.hpp:11