From 400d8bb45ee25ce226bb343a3dfaab84e6d3a8e1 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 24 Feb 2008 13:36:01 +0000 Subject: less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1) *: minor shrink --- sysklogd/klogd.c | 2 +- sysklogd/syslogd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sysklogd') diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index 6a675b8b3..01d597178 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -26,7 +26,7 @@ static void klogd_signal(int sig ATTRIBUTE_UNUSED) klogctl(7, NULL, 0); klogctl(0, NULL, 0); syslog(LOG_NOTICE, "klogd: exiting"); - exit(EXIT_SUCCESS); + kill_myself_with_sig(sig); } #define log_buffer bb_common_bufsiz1 diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index c71350750..0dc69d8cc 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -475,7 +475,7 @@ static void quit_signal(int sig) puts("syslogd exiting"); if (ENABLE_FEATURE_IPC_SYSLOG) ipcsyslog_cleanup(); - exit(1); + kill_myself_with_sig(sig); } #ifdef SYSLOGD_MARK -- cgit v1.2.3