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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user