diff --git a/src/syslogd.c b/src/syslogd.c index cdab802..33b73a3 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -2372,6 +2372,11 @@ void die(int signo) flog(LOG_SYSLOG | LOG_INFO, "exiting on signal %d", signo); } + /* + * Stop all active timers + */ + timer_exit(); + /* * Close all open log files. */ diff --git a/src/timer.c b/src/timer.c index 2fd7280..025b650 100644 --- a/src/timer.c +++ b/src/timer.c @@ -212,7 +212,7 @@ void timer_exit(void) alarm(0); - close(timer_fd[0]); + socket_close((timer_fd[0])); close(timer_fd[1]); LIST_FOREACH_SAFE(tmr, &tmr_head, tmr_link, tmp) {