From: Vsevolod Stakhov Date: Thu, 26 May 2016 13:29:40 +0000 (+0100) Subject: [Fix] Handle log pipe read errors X-Git-Tag: 1.3.0~431 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=79375a182ea07a8523e2b16683d0c4c4cdd26cc4;p=rspamd.git [Fix] Handle log pipe read errors --- 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); } }