Hi,
I don't understand why we should reset Initialized during syslogd
die(). It looks like it was needed when we had real signal handlers.
But we have switched to libevent for a long time. It was introduced
here:
revision 1.13
date: 1997/06/18 09:53:38; author: deraadt; state: Exp; lines: +3 -0;
act in-Initialized inside part of die(); avoids printing mangled log entry;
joerg
ok to remove this logic?
bluhm
Index: usr.sbin/syslogd/syslogd.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/syslogd/syslogd.c,v
retrieving revision 1.255
diff -u -p -r1.255 syslogd.c
--- usr.sbin/syslogd/syslogd.c 17 Jul 2018 13:51:47 -0000 1.255
+++ usr.sbin/syslogd/syslogd.c 31 Aug 2018 17:43:26 -0000
@@ -2277,9 +2277,7 @@ __dead void
die(int signo)
{
struct filed *f;
- int was_initialized = Initialized;
- Initialized = 0; /* Don't log SIGCHLDs */
SIMPLEQ_FOREACH(f, &Files, f_next) {
/* flush any pending output */
if (f->f_prevcount)
@@ -2294,7 +2292,6 @@ die(int signo)
f->f_dropped = 0;
}
}
- Initialized = was_initialized;
dropped_warn(&init_dropped, "during initialization");
dropped_warn(&file_dropped, "to file");
dropped_warn(&tcpbuf_dropped, "to remote loghost");