core, xfer: display more information on fork errors (issue #573)

v2.8-utf8proc
Sébastien Helleu 2016-12-13 18:24:46 +01:00
parent 6da99d8749
commit 6c1815d3d1
17 changed files with 58 additions and 45 deletions

View File

@ -30,6 +30,7 @@ New features::
Improvements::
* core, xfer: display more information on fork errors (issue #573)
* core: add a slash before commands completed in arguments of /command, /debug time, /key bind, /key bindctxt, /mute, /repeat, /wait
* core: add a warning in header of configuration files to not edit by hand (issue #851)
* alias: add a slash before commands completed in arguments of /alias
@ -64,7 +65,7 @@ New features::
Improvements::
* core, irc, xfer: display more information in memory allocation errors (issue #573)
* core, irc, xfer: display more information on memory allocation errors (issue #573)
* api: remove functions printf_date() and printf_tags()
* irc: rename server options "default_msg_{kick|part|quit}" to "msg_{kick|part|quit}", evaluate them
* relay: allow escape of comma in command "init" (weechat protocol) (issue #730)

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-09-03 08:23+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -11390,8 +11390,8 @@ msgstr "%s%s: špatný kontrolní součet CRC32 souboru %s"
msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s: chyba při načítání souboru \"%s\""
#, c-format
msgid "%s%s: unable to fork"
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: nemohu provést fork"
#, fuzzy, c-format

View File

@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-12-11 20:05+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -12979,8 +12979,8 @@ msgstr "%s%s: Datei %s besitzt fehlerhafte CRC32 Prüfsumme"
msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s: CRC32 Fehler bei der Wiederaufnahme"
#, c-format
msgid "%s%s: unable to fork"
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: es kann kein fork erstellt werden"
#, c-format

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-09-03 08:23+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -11651,8 +11651,8 @@ msgstr "%s%s: argumentos incorrectos para la función \"%s\" (script: %s)"
msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s: error mientras se cargaba el archivo \"%s\""
#, c-format
msgid "%s%s: unable to fork"
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: no es posible bifurcarse"
#, fuzzy, c-format

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"PO-Revision-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-12-13 18:22+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -12720,8 +12720,8 @@ msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s : erreur CRC32 durant la reprise"
#, c-format
msgid "%s%s: unable to fork"
msgstr "%s%s : impossible de créer un processus"
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s : impossible de créer un processus (%s)"
#, c-format
msgid ""

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-09-03 08:23+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -10686,7 +10686,7 @@ msgid "%s%s: CRC32 error while resuming"
msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n"
#, fuzzy, c-format
msgid "%s%s: unable to fork"
msgid "%s%s: unable to fork (%s)"
msgstr "%s DCC: nem sikerült forkolni\n"
#, fuzzy, c-format

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -11837,8 +11837,8 @@ msgstr "%s%s: argomenti errati per la funzione \"%s\" (script: %s)"
msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s: errore durante il caricamento del file \"%s\""
#, c-format
msgid "%s%s: unable to fork"
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: impossibile effettuare il fork"
#, fuzzy, c-format

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-11-23 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -12216,8 +12216,8 @@ msgstr "%s%s: ファイル %s の CRC32 が違います"
msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s: レジューム中に CRC32 エラー"
#, c-format
msgid "%s%s: unable to fork"
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: フォークできません"
#, c-format

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Krzysztof Korościk <soltys1@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -12448,8 +12448,8 @@ msgstr "%s%s: nieprawidłowa wartość CRC32 dla pliku %s"
msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s: błąd CRC32 podczas wznawiania"
#, c-format
msgid "%s%s: unable to fork"
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: nie można uruchomić procesu potomnego"
#, c-format

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-09-27 12:29+0000\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -12461,8 +12461,8 @@ msgstr "%s%s: CRC32 do ficheiro %s incorreto"
msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s: erro de CRC32 ao resumir"
#, c-format
msgid "%s%s: unable to fork"
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: não foi possível criar processo (fork)"
#, c-format

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -11130,8 +11130,8 @@ msgstr "%s%s: argumentos inválidos para a função \"%s\" (script: %s)"
msgid "%s%s: CRC32 error while resuming"
msgstr "%s%s: erro na leitura do arquivo \"%s\""
#, c-format
msgid "%s%s: unable to fork"
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: não foi possível efetuar o fork"
#, fuzzy, c-format

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -10720,7 +10720,7 @@ msgid "%s%s: CRC32 error while resuming"
msgstr "Не могу записать лог-файл \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unable to fork"
msgid "%s%s: unable to fork (%s)"
msgstr "%s DCC: не могу forkнуться\n"
#, fuzzy, c-format

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2016-05-18 07:43+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9717,9 +9717,9 @@ msgstr ""
msgid "%s%s: CRC32 error while resuming"
msgstr ""
#, c-format
msgid "%s%s: unable to fork"
msgstr ""
#, fuzzy, c-format
msgid "%s%s: unable to fork (%s)"
msgstr "%s%s: sunucuya yeniden bağlanılıyor..."
#, c-format
msgid ""

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-12-11 13:49+0100\n"
"POT-Creation-Date: 2016-12-13 18:21+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -9619,7 +9619,7 @@ msgid "%s%s: CRC32 error while resuming"
msgstr ""
#, c-format
msgid "%s%s: unable to fork"
msgid "%s%s: unable to fork (%s)"
msgstr ""
#, c-format

View File

@ -2062,6 +2062,7 @@ void
hook_process_run (struct t_hook *hook_process)
{
int pipes[3][2], timeout, max_calls, rc, i;
char str_error[1024];
long interval;
pid_t pid;
@ -2100,12 +2101,15 @@ hook_process_run (struct t_hook *hook_process)
{
/* fork failed */
case -1:
snprintf (str_error, sizeof (str_error),
"fork error: %s",
strerror (errno));
(void) (HOOK_PROCESS(hook_process, callback))
(hook_process->callback_pointer,
hook_process->callback_data,
HOOK_PROCESS(hook_process, command),
WEECHAT_HOOK_PROCESS_ERROR,
NULL, NULL);
NULL, str_error);
unhook (hook_process);
return;
/* child process */

View File

@ -1639,6 +1639,7 @@ void
network_connect_with_fork (struct t_hook *hook_connect)
{
int child_pipe[2], child_socket[2], rc, i;
char str_error[1024];
#ifdef HAVE_GNUTLS
const char *pos_error;
#endif /* HAVE_GNUTLS */
@ -1736,11 +1737,14 @@ network_connect_with_fork (struct t_hook *hook_connect)
{
/* fork failed */
case -1:
snprintf (str_error, sizeof (str_error),
"fork error: %s",
strerror (errno));
(void) (HOOK_CONNECT(hook_connect, callback))
(hook_connect->callback_pointer,
hook_connect->callback_data,
WEECHAT_HOOK_CONNECT_MEMORY_ERROR,
0, -1, "fork", NULL);
0, -1, str_error, NULL);
unhook (hook_connect);
return;
/* child process */

View File

@ -228,8 +228,10 @@ xfer_network_send_file_fork (struct t_xfer *xfer)
{
case -1: /* fork failed */
weechat_printf (NULL,
_("%s%s: unable to fork"),
weechat_prefix ("error"), XFER_PLUGIN_NAME);
_("%s%s: unable to fork (%s)"),
weechat_prefix ("error"),
XFER_PLUGIN_NAME,
strerror (errno));
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return;
@ -299,8 +301,10 @@ xfer_network_recv_file_fork (struct t_xfer *xfer)
{
case -1: /* fork failed */
weechat_printf (NULL,
_("%s%s: unable to fork"),
weechat_prefix ("error"), XFER_PLUGIN_NAME);
_("%s%s: unable to fork (%s)"),
weechat_prefix ("error"),
XFER_PLUGIN_NAME,
strerror (errno));
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return;