>>In rev 1.67 and later, the message goes to the log buffer only if a
>>process is reading the log buffer. If no process is reading, the
>>message goes to the console ONLY, and it is not put into the log
>>buffer. This behavior is inconsistent with the above comment.  Is this
>>a bug introduced in rev 1.67, or is it the intended new behavior and
>>the comment is out of date?
>
>Actually, I think this is consistent, since console messages is now
>also put in the buffer, but I am not 100% sure...

You are talking about printf(9) printing messages to /dev/console
AND the log buffer.

I was asking about subr_prf.c:log(9).

1) log() in subr_prf.c rev 1.66 or earlier
 1a) if a process is reading the log buffer...

   log() -------> the log buffer ONLY

 1b) if no process is reading the log buffer...

   log() ----+--> the log buffer
             | 
             +--> /dev/console


2) log() in rev 1.67 or later

   log() -------> the log buffer ONLY


The comment in subr_prf.c documents the behavior 1). But the current
version has the behavior 2).  If the behavior 2) is what we want, the
comment should be updated as such.  If the behavior 1) is the
correct one, log() should be fixed.

I favour the behavior 1), because log() output will be lost if log()
is called before syslogd starts, and we have no way of recovering it
afterwards.

As for printf(9) printing both to /dev/console and to the log buffer,
I don't care much.

Kazu


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to