1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

fifo: ignore read failing with error EAGAIN (bug #37019) (patch from Matt Robinson)

This commit is contained in:
Sebastien Helleu
2012-08-02 22:59:30 +02:00
parent 04520c81d6
commit b7eef5105c
13 changed files with 41 additions and 38 deletions
+7 -2
View File
@@ -30,6 +30,7 @@
#include <dirent.h>
#include <limits.h>
#include <fcntl.h>
#include <errno.h>
#include "../weechat-plugin.h"
#include "fifo.h"
@@ -369,9 +370,13 @@ fifo_read ()
{
if (num_read < 0)
{
if (errno == EAGAIN)
return WEECHAT_RC_OK;
weechat_printf (NULL,
_("%s%s: error reading pipe, closing it"),
weechat_prefix ("error"), FIFO_PLUGIN_NAME);
_("%s%s: error reading pipe (%d %s), closing it"),
weechat_prefix ("error"), FIFO_PLUGIN_NAME,
errno, strerror (errno));
fifo_remove ();
}
else