}
return;
- case SIGTERM:
- break;
-
case SIGHUP:
sighup = true;
return;
default:
- return;
+ syslog(LOG_ERR, "Killed (got signal %d)...", sig);
+ exit(-1);
}
-
- syslog(LOG_ERR, "Killed...");
- exit(-1);
}
void common_initialize(void)
signal(SIGINT, &common_sighandler);
signal(SIGTERM, &common_sighandler);
signal(SIGHUP, &common_sighandler);
+ signal(SIGSEGV, &common_sighandler);
syslog(LOG_INFO, "Starting...");
return 0;
}
static void main_shutdown(void)
{
- syslog(LOG_INFO, cleanexit ? "Stopping..." : "Unclean exit...");
closelog();
}
close(epollfd);
error:
- cleanexit = true;
return exitcode;
}
fclose(f);
f = NULL;
}
+ syslog(LOG_INFO, "Stopping...");
return res;
}