/// Standard signal handler. static void default_handler(int signal, siginfo_t *info, void *context) { UNUSED(info); UNUSED(context); if (event_is_signal_observed(signal)) { event_fire_signal(signal); } }
/// Respond to a hup signal by exiting, unless it is caught by a shellscript function, in which case /// we do nothing. static void handle_hup(int sig, siginfo_t *info, void *context) { if (event_is_signal_observed(SIGHUP)) { default_handler(sig, 0, 0); } else { reader_exit(1, 1); } }
/// Respond to a hup signal by exiting, unless it is caught by a shellscript function, in which case /// we do nothing. static void handle_hup(int sig, siginfo_t *info, void *context) { UNUSED(info); UNUSED(context); if (reraise_if_forked_child(sig)) return; if (event_is_signal_observed(SIGHUP)) { default_handler(sig, 0, 0); } else { reader_force_exit(); } topic_monitor_t::principal().post(topic_t::sighupint); }