mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 18:30:11 +01:00
improved signal logging for piler-smtp.c
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
9997c10b4e
commit
c3a36dc213
@ -75,6 +75,30 @@ void p_clean_exit(){
|
||||
}
|
||||
|
||||
|
||||
void p_term_exit(){
|
||||
syslog(LOG_PRIORITY, "got signal: SIGTERM");
|
||||
p_clean_exit();
|
||||
}
|
||||
|
||||
|
||||
void p_kill_exit(){
|
||||
syslog(LOG_PRIORITY, "got signal: SIGKILL");
|
||||
p_clean_exit();
|
||||
}
|
||||
|
||||
|
||||
void p_stop_exit() {
|
||||
syslog(LOG_PRIORITY, "got signal: SIGSTOP");
|
||||
p_clean_exit();
|
||||
}
|
||||
|
||||
|
||||
void p_segv_exit(){
|
||||
syslog(LOG_PRIORITY, "got signal: SIGSEGV");
|
||||
p_clean_exit();
|
||||
}
|
||||
|
||||
|
||||
void fatal(char *s){
|
||||
syslog(LOG_PRIORITY, "%s", s);
|
||||
p_clean_exit();
|
||||
@ -187,11 +211,11 @@ int main(int argc, char **argv){
|
||||
}
|
||||
|
||||
set_signal_handler(SIGINT, p_clean_exit);
|
||||
set_signal_handler(SIGTERM, p_clean_exit);
|
||||
set_signal_handler(SIGTERM, p_term_exit);
|
||||
|
||||
set_signal_handler(SIGKILL, p_clean_exit);
|
||||
set_signal_handler(SIGSEGV, p_clean_exit);
|
||||
set_signal_handler(SIGSTOP, p_clean_exit);
|
||||
set_signal_handler(SIGKILL, p_kill_exit);
|
||||
set_signal_handler(SIGSEGV, p_segv_exit);
|
||||
set_signal_handler(SIGSTOP, p_stop_exit);
|
||||
|
||||
set_signal_handler(SIGALRM, check_for_client_timeout);
|
||||
set_signal_handler(SIGHUP, initialise_configuration);
|
||||
|
Loading…
Reference in New Issue
Block a user