/* Note that SA_RESETHAND requires either _POSIX_C_SOURCE>=200809L or _XOPEN_SOURCE>=500  */
void hwm_set_sig_handler(void)
/* Note that SA_RESETHAND requires either _POSIX_C_SOURCE>=200809L or _XOPEN_SOURCE>=500  */
void hwm_set_sig_handler(void)
{
	struct sigaction act;
	act.sa_handler = hwm_signal_end_handler;
	PC_SAFE_CALL(sigemptyset(&act.sa_mask));
	act.sa_flags = SA_RESETHAND;
	PC_SAFE_CALL(sigaction(SIGTERM, &act, NULL));
	PC_SAFE_CALL(sigaction(SIGINT, &act, NULL));
}