syslog.2: Clarify semantics of SYSLOG_ACTION_CLEAR

The SYSLOG_ACTION_CLEAR command (5) does not really clear
the ring buffer; rather it affects the semantics of what
is returned by commands 3 (SYSLOG_ACTION_READ_ALL) and
4 (SYSLOG_ACTION_READ_CLEAR).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-11-29 14:48:19 +01:00
parent 70a259dcd5
commit 7fc3d0580b
1 changed files with 12 additions and 1 deletions

View File

@ -102,7 +102,7 @@ placing then in the buffer pointed to by
The call reads the last \fIlen\fP
bytes from the log buffer (nondestructively),
but will not read more than was written into the buffer since the
last "clear ring buffer" command (which does not clear the buffer at all).
last "clear ring buffer" command (see command 5 below)).
The call returns the number of bytes read.
.TP
.BR SYSLOG_ACTION_READ_CLEAR " (4)"
@ -118,6 +118,17 @@ The
and
.I len
arguments are ignored.
.IP
This command does not really clear the ring buffer.
Rather, it sets a kernel bookkeeping variable that
determines the results returned by commands 3
.RB ( SYSLOG_ACTION_READ_ALL )
and 4
.RB ( SYSLOG_ACTION_READ_CLEAR ).
This command has no effect on commands 2
.RB ( SYSLOG_ACTION_READ )
and 9
.RB ( SYSLOG_ACTION_SIZE_UNREAD ).
.TP
.BR SYSLOG_ACTION_CONSOLE_OFF " (6)"
Disable printk to console.