aboutsummaryrefslogtreecommitdiffstats
path: root/src/log_helper.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-26 14:29:40 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-26 14:29:40 +0100
commit79375a182ea07a8523e2b16683d0c4c4cdd26cc4 (patch)
tree62e5633e4d3582cd5c96836c6a5c5be49da158c2 /src/log_helper.c
parented8443a06118e673a8aac123238523b22f61dcdd (diff)
downloadrspamd-79375a182ea07a8523e2b16683d0c4c4cdd26cc4.tar.gz
rspamd-79375a182ea07a8523e2b16683d0c4c4cdd26cc4.zip
[Fix] Handle log pipe read errors
Diffstat (limited to 'src/log_helper.c')
-rw-r--r--src/log_helper.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/log_helper.c b/src/log_helper.c
index c4cbeb73c..a118f1181 100644
--- a/src/log_helper.c
+++ b/src/log_helper.c
@@ -129,7 +129,14 @@ rspamd_log_helper_read (gint fd, short what, gpointer ud)
}
}
else if (r == -1) {
- msg_warn ("cannot read data from log pipe: %s", strerror (errno));
+ if (errno != EAGAIN || errno != EINTR) {
+ msg_warn ("cannot read data from log pipe: %s", strerror (errno));
+ event_del (&ctx->log_ev);
+ }
+ }
+ else if (r == 0) {
+ msg_warn ("cannot read data from log pipe: EOF");
+ event_del (&ctx->log_ev);
}
}