timeout_set(&timeout_event, timeout_handler, &timeout_event);
event_add(&timeout_event, &(struct timeval){pingtimeout, 0});
signal_set(&sighup_event, SIGHUP, sighup_handler, NULL);
timeout_set(&timeout_event, timeout_handler, &timeout_event);
event_add(&timeout_event, &(struct timeval){pingtimeout, 0});
signal_set(&sighup_event, SIGHUP, sighup_handler, NULL);