aboutsummaryrefslogtreecommitdiffstats
path: root/man2/syslog.2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2012-11-29 14:48:19 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2012-11-29 15:51:22 +0100
commit7fc3d0580bafd4d804eee722769ec7786987910c (patch)
treec76cfeb7c4e8f9cad51ab6a3a558cad63a7ea114 /man2/syslog.2
parent70a259dcd570cebce2ec05d826f14b36368577eb (diff)
downloadman-pages-7fc3d0580bafd4d804eee722769ec7786987910c.tar.gz
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>
Diffstat (limited to 'man2/syslog.2')
-rw-r--r--man2/syslog.213
1 files changed, 12 insertions, 1 deletions
diff --git a/man2/syslog.2 b/man2/syslog.2
index 24fc8fc86d..4dd9c09c9b 100644
--- a/man2/syslog.2
+++ b/man2/syslog.2
@@ -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.