syslogd: Minor, don't log to console when exiting ...

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-11-13 18:41:42 +01:00
parent 54edca09d9
commit 09f6b7bf6c
2 changed files with 2 additions and 7 deletions

View File

@ -1980,19 +1980,14 @@ void debug_switch(int signo)
void die(int signo)
{
struct filed *f, *next;
int was_initialized = Initialized;
struct peer *pe, *penext;
Initialized = 0; /* Don't log SIGCHLDs in case we
receive one during exiting */
/* flush any pending output */
SIMPLEQ_FOREACH(f, &fhead, f_link) {
/* flush any pending output */
if (f->f_prevcount)
fprintlog_successive(f, 0);
}
Initialized = was_initialized;
if (signo) {
logit("syslogd: exiting on signal %d\n", signo);
flog(LOG_SYSLOG | LOG_INFO, "exiting on signal %d", signo);

View File

@ -199,6 +199,7 @@ struct peer {
* to us.
*/
struct allowedpeer {
SIMPLEQ_ENTRY(allowedpeer) next;
int isnumeric;
u_short port;
union {
@ -211,7 +212,6 @@ struct allowedpeer {
#define a_addr u.numeric.addr
#define a_mask u.numeric.mask
#define a_name u.name
SIMPLEQ_ENTRY(allowedpeer) next;
};
/* Timestamps of log entries. */