From b7eef5105cffb71f58a8f66de2b4618250a120af Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 2 Aug 2012 22:59:30 +0200 Subject: fifo: ignore read failing with error EAGAIN (bug #37019) (patch from Matt Robinson) --- ChangeLog | 3 ++- po/cs.po | 6 +++--- po/de.po | 6 +++--- po/es.po | 6 +++--- po/fr.po | 8 ++++---- po/hu.po | 4 ++-- po/it.po | 6 +++--- po/ja.po | 6 +++--- po/pl.po | 6 +++--- po/pt_BR.po | 11 ++++------- po/ru.po | 4 ++-- po/weechat.pot | 4 ++-- src/plugins/fifo/fifo.c | 9 +++++++-- 13 files changed, 41 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65eba3fec..581cc00ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.9-dev, 2012-08-01 +v0.3.9-dev, 2012-08-02 Version 0.3.9 (under dev!) @@ -41,6 +41,7 @@ Version 0.3.9 (under dev!) * aspell: add missing dictionaries (ast/grc/hus/kn/ky) * charset: do not allow "UTF-8" in charset options (useless because UTF-8 is the internal WeeChat charset) +* fifo: ignore read failing with error EAGAIN (bug #37019) * guile: fix crash when unloading a script without pointer to interpreter * guile: fix path of guile include dirs in cmake build (patch #7790) * irc: fix bug with prefix chars which are in chanmodes with a type different diff --git a/po/cs.po b/po/cs.po index 55e89cdb1..9faf860e3 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -3971,8 +3971,8 @@ msgstr "%s%s: chyba, přijat nekorektní text na rouře" msgid "%s%s: error, buffer not found for pipe data" msgstr "%s%s: chyba, nenalezen buffer pro data roury" -#, c-format -msgid "%s%s: error reading pipe, closing it" +#, fuzzy, c-format +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "%s%s: chyba při znovunačtení roury, zavírám ji" #, c-format diff --git a/po/de.po b/po/de.po index 1c1fa149e..6d20ee209 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-07-22 23:37+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -4343,8 +4343,8 @@ msgstr "%s%s: Fehler: ungültiger Text von Pipe empfangen" msgid "%s%s: error, buffer not found for pipe data" msgstr "%s%s: Fehler: Buffer für PIPE-Daten nicht gefunden" -#, c-format -msgid "%s%s: error reading pipe, closing it" +#, fuzzy, c-format +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "" "%s%s: Fehler beim Lesen der Pipe. Pipe wird aufgrund des Fehlers geschlossen" diff --git a/po/es.po b/po/es.po index 9fe46e0f0..4619796ed 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-07-27 12:16+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -4170,8 +4170,8 @@ msgstr "%s%s: error, texto inválido recibido en la tubería" msgid "%s%s: error, buffer not found for pipe data" msgstr "%s%s: error, buffer no encontrado para los datos de la tubería" -#, c-format -msgid "%s%s: error reading pipe, closing it" +#, fuzzy, c-format +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "%s%s: error al leer la tubería, cerrándolo" #, c-format diff --git a/po/fr.po b/po/fr.po index e03ba1742..334b75737 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" -"PO-Revision-Date: 2012-08-02 08:55+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" +"PO-Revision-Date: 2012-08-02 22:50+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -4225,8 +4225,8 @@ msgid "%s%s: error, buffer not found for pipe data" msgstr "%s%s: erreur, tampon non trouvé pour les données du tube" #, c-format -msgid "%s%s: error reading pipe, closing it" -msgstr "%s%s: erreur en lecture du tube, fermeture" +msgid "%s%s: error reading pipe (%d %s), closing it" +msgstr "%s%s: erreur en lecture du tube (%d %s), fermeture" #, c-format msgid "%s%s: error opening file, closing it" diff --git a/po/hu.po b/po/hu.po index 402f7fcde..97b6f3840 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -3598,7 +3598,7 @@ msgid "%s%s: error, buffer not found for pipe data" msgstr "%s a \"%s\" szerver nem található (FIFO cső adat)\n" #, fuzzy, c-format -msgid "%s%s: error reading pipe, closing it" +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "%s hiba a FIFO cső olvasása közben, bezárás\n" #, fuzzy, c-format diff --git a/po/it.po b/po/it.po index e6178eef9..9b353710d 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-07-30 15:38+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -4164,8 +4164,8 @@ msgstr "%s%s: errore, testo non valido ricevuto sulla pipe" msgid "%s%s: error, buffer not found for pipe data" msgstr "%s%s: errore, buffer non trovato per la pipe dati" -#, c-format -msgid "%s%s: error reading pipe, closing it" +#, fuzzy, c-format +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "%s%s: errore nella lettura della pipe, chiusura" #, c-format diff --git a/po/ja.po b/po/ja.po index 48ad9b1d2..817d7fec1 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-07-27 12:16+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -4060,8 +4060,8 @@ msgstr "%s%s: エラー、パイプを通して不正なテキストが渡され msgid "%s%s: error, buffer not found for pipe data" msgstr "%s%s: エラー、パイプデータで指定されたバッファが見つかりません" -#, c-format -msgid "%s%s: error reading pipe, closing it" +#, fuzzy, c-format +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "%s%s: パイプ読み取り中にエラー、パイプを閉じています" #, c-format diff --git a/po/pl.po b/po/pl.po index 6ada2562c..3f9a072bc 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-07-27 12:16+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -4149,8 +4149,8 @@ msgstr "%s%s: błąd, otrzymano niewłaściwy tekst ze strumienia" msgid "%s%s: error, buffer not found for pipe data" msgstr "%s%s: błąd, nie znaleziono buforu dla danych ze strumienia" -#, c-format -msgid "%s%s: error reading pipe, closing it" +#, fuzzy, c-format +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "%s%s: błąd odczytu ze strumienia, zamykam go" #, c-format diff --git a/po/pt_BR.po b/po/pt_BR.po index ad55f9614..b72203d66 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -4012,9 +4012,9 @@ msgstr "" msgid "%s%s: error, buffer not found for pipe data" msgstr "" -#, c-format -msgid "%s%s: error reading pipe, closing it" -msgstr "" +#, fuzzy, c-format +msgid "%s%s: error reading pipe (%d %s), closing it" +msgstr "%s%s: erro ao enviar dados ao cliente: %s" #, c-format msgid "%s%s: error opening file, closing it" @@ -8273,9 +8273,6 @@ msgstr "" #~ msgid "%s%s: sending data to client error %d: %d %s" #~ msgstr "%s%s: erro ao enviar dados ao cliente %d (%s)" -#~ msgid "%s%s: error sending data to client: %s" -#~ msgstr "%s%s: erro ao enviar dados ao cliente: %s" - #~ msgid "display channel modes in \"buffer_name\" bar item" #~ msgstr "exibir modos do canal no item da barra \"buffer_name\"" diff --git a/po/ru.po b/po/ru.po index b6d51b8ed..30bc1c85b 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -3628,7 +3628,7 @@ msgid "%s%s: error, buffer not found for pipe data" msgstr "%s сервер \"%s\" не найден (данные FIFO pipe)\n" #, fuzzy, c-format -msgid "%s%s: error reading pipe, closing it" +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "%s ошибка чтения FIFO pipe, закрываю его\n" #, fuzzy, c-format diff --git a/po/weechat.pot b/po/weechat.pot index 81bf18818..5eb38173c 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-02 08:54+0200\n" +"POT-Creation-Date: 2012-08-02 22:48+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3184,7 +3184,7 @@ msgid "%s%s: error, buffer not found for pipe data" msgstr "" #, c-format -msgid "%s%s: error reading pipe, closing it" +msgid "%s%s: error reading pipe (%d %s), closing it" msgstr "" #, c-format diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index 6789c3aa8..1f4c404a3 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -30,6 +30,7 @@ #include #include #include +#include #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 -- cgit v1.2.3