summaryrefslogtreecommitdiffstats
path: root/plugins/imkmsg/kmsg.c
diff options
context:
space:
mode:
authorMilan Bartos <mbartos@redhat.com>2013-03-18 11:12:46 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-03-18 12:11:09 +0100
commitbc740ffc8009095dd6cec3e3629fcd2283906fcd (patch)
tree1a9a0ca1be706f22c74783494175d6ed3f5cfafd /plugins/imkmsg/kmsg.c
parent3c0c1aa425c8f1bbaa61cf93724cae8e0bd72fee (diff)
downloadrsyslog-bc740ffc8009095dd6cec3e3629fcd2283906fcd.tar.gz
rsyslog-bc740ffc8009095dd6cec3e3629fcd2283906fcd.tar.bz2
rsyslog-bc740ffc8009095dd6cec3e3629fcd2283906fcd.zip
Do not exit when messages get overwritten in the circular buffer
modified: plugins/imkmsg/kmsg.c
Diffstat (limited to 'plugins/imkmsg/kmsg.c')
-rw-r--r--plugins/imkmsg/kmsg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/imkmsg/kmsg.c b/plugins/imkmsg/kmsg.c
index 0117b6ba..f1815f25 100644
--- a/plugins/imkmsg/kmsg.c
+++ b/plugins/imkmsg/kmsg.c
@@ -190,6 +190,10 @@ readkmsg(void)
if (i > 0) {
/* successful read of message of nonzero length */
pRcv[i] = '\0';
+ } else if (i == -EPIPE) {
+ imkmsgLogIntMsg(LOG_WARNING,
+ "imkmsg: some messages in circular buffer got overwritten");
+ continue;
} else {
/* something went wrong - error or zero length message */
if (i < 0 && errno != EINTR && errno != EAGAIN) {