syslogd gets kernel log messages only once every 30 seconds or
at the top of the minute, whichever comes first. It seems logtimeout() is only called once after the kernel log is opened and then never again after that. So I guess syslogd only gets kernel log messages by virtue of syncer(4)'s flushes ...? PR: 27361 Submitted by: pkern@utcc.utoronto.ca MFC after: 1 week
This commit is contained in:
parent
ea63a39cef
commit
4787f91d6b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77057
@ -115,8 +115,8 @@ static int
|
||||
logclose(dev_t dev, int flag, int mode, struct proc *p)
|
||||
{
|
||||
|
||||
callout_stop(&logsoftc.sc_callout);
|
||||
log_open = 0;
|
||||
callout_stop(&logsoftc.sc_callout);
|
||||
logsoftc.sc_state = 0;
|
||||
funsetown(logsoftc.sc_sigio);
|
||||
return (0);
|
||||
@ -188,11 +188,14 @@ static void
|
||||
logtimeout(void *arg)
|
||||
{
|
||||
|
||||
if (msgbuftrigger == 0)
|
||||
return;
|
||||
msgbuftrigger = 0;
|
||||
if (!log_open)
|
||||
return;
|
||||
if (msgbuftrigger == 0) {
|
||||
callout_reset(&logsoftc.sc_callout,
|
||||
hz / log_wakeups_per_second, logtimeout, NULL);
|
||||
return;
|
||||
}
|
||||
msgbuftrigger = 0;
|
||||
selwakeup(&logsoftc.sc_selp);
|
||||
if ((logsoftc.sc_state & LOG_ASYNC) && logsoftc.sc_sigio != NULL)
|
||||
pgsigio(logsoftc.sc_sigio, SIGIO, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user