syslogd: Minor, don't log to console when exiting ...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
54edca09d9
commit
09f6b7bf6c
@ -1980,19 +1980,14 @@ void debug_switch(int signo)
|
|||||||
void die(int signo)
|
void die(int signo)
|
||||||
{
|
{
|
||||||
struct filed *f, *next;
|
struct filed *f, *next;
|
||||||
int was_initialized = Initialized;
|
|
||||||
struct peer *pe, *penext;
|
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) {
|
SIMPLEQ_FOREACH(f, &fhead, f_link) {
|
||||||
|
/* flush any pending output */
|
||||||
if (f->f_prevcount)
|
if (f->f_prevcount)
|
||||||
fprintlog_successive(f, 0);
|
fprintlog_successive(f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Initialized = was_initialized;
|
|
||||||
if (signo) {
|
if (signo) {
|
||||||
logit("syslogd: exiting on signal %d\n", signo);
|
logit("syslogd: exiting on signal %d\n", signo);
|
||||||
flog(LOG_SYSLOG | LOG_INFO, "exiting on signal %d", signo);
|
flog(LOG_SYSLOG | LOG_INFO, "exiting on signal %d", signo);
|
||||||
|
@ -199,6 +199,7 @@ struct peer {
|
|||||||
* to us.
|
* to us.
|
||||||
*/
|
*/
|
||||||
struct allowedpeer {
|
struct allowedpeer {
|
||||||
|
SIMPLEQ_ENTRY(allowedpeer) next;
|
||||||
int isnumeric;
|
int isnumeric;
|
||||||
u_short port;
|
u_short port;
|
||||||
union {
|
union {
|
||||||
@ -211,7 +212,6 @@ struct allowedpeer {
|
|||||||
#define a_addr u.numeric.addr
|
#define a_addr u.numeric.addr
|
||||||
#define a_mask u.numeric.mask
|
#define a_mask u.numeric.mask
|
||||||
#define a_name u.name
|
#define a_name u.name
|
||||||
SIMPLEQ_ENTRY(allowedpeer) next;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Timestamps of log entries. */
|
/* Timestamps of log entries. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user