void die(const char *reason) { msg(LOG_ERR, NULL, "die: %s", reason); smfi_stop(); sleep(60); /* not reached, smfi_stop() kills thread */ abort(); }
static void * watchdog(void *a) { const char *mail_log = (const char *)a; #ifdef NOBODY tail(mail_log); smfi_stop(); #else for(;;) { sleep(5); timeout(); tail(mail_log); } #endif return NULL; }