New features::
+ * core: add number of processes in command `/sys waitpid`
* core, alias, trigger: allow wildcard in commands `/bar`, `/item`, `/proxy`, `/alias` and `/trigger` (issue #1956)
* irc: add option irc.look.ignore_tag_messages (issue #989)
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:09+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
msgid "system actions"
msgstr "seznam konfiguračních možností"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
#, fuzzy
#| msgid "values for a configuration option"
msgid "toggle value of a config option"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:09+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
msgid "system actions"
msgstr "Systemaktionen"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
msgid "toggle value of a config option"
msgstr "den Wert einer Konfigurationsoption umschalten"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:09+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
msgid "system actions"
msgstr "lista de opciones"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
#, fuzzy
#| msgid "values for a configuration option"
msgid "toggle value of a config option"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
-"PO-Revision-Date: 2023-10-20 13:09+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
+"PO-Revision-Date: 2023-10-20 21:02+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
msgid "system actions"
msgstr "actions système"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr "get rlimit|rusage || suspend || waitpid <nombre>"
+
msgid "raw[get]: display system info"
msgstr "raw[get] : afficher des informations système"
"raw[waitpid] : prendre connaissance des processus fils qui sont terminés "
"(pour éviter les processus \"zombies\")"
+msgid "number: number of processes to clean"
+msgstr "nombre : nombre de processus à nettoyer"
+
msgid "toggle value of a config option"
msgstr "basculer la valeur d'une option de configuration"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:09+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
msgid "system actions"
msgstr "konfigurációs paraméterek beállítása"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
#, fuzzy
msgid "toggle value of a config option"
msgstr "Nem található az opció\n"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:10+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
msgid "system actions"
msgstr "elenco delle opzioni"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
#, fuzzy
#| msgid "values for a configuration option"
msgid "toggle value of a config option"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:10+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
msgid "system actions"
msgstr "fset オプション"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
#, fuzzy
#| msgid "values for a configuration option"
msgid "toggle value of a config option"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:10+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
msgid "system actions"
msgstr "opcje fset"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
msgid "toggle value of a config option"
msgstr "przełącza wartość opcji konfiguracyjnej"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:10+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
msgid "system actions"
msgstr "lista de opções"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
#, fuzzy
#| msgid "values for a configuration option"
msgid "toggle value of a config option"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:11+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
msgid "system actions"
msgstr "lista de opções"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
#, fuzzy
#| msgid "values for a configuration option"
msgid "toggle value of a config option"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:11+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
msgid "system actions"
msgstr "настроить параметры конфигурации"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
#, fuzzy
msgid "toggle value of a config option"
msgstr "Не найден параметр\n"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:11+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
msgid "system actions"
msgstr "системске акције"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
msgid "toggle value of a config option"
msgstr "пребацује вредност опције конфигурације"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\n"
"PO-Revision-Date: 2023-10-20 13:11+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
msgid "system actions"
msgstr "fset seçenekleri"
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
msgid "toggle value of a config option"
msgstr "bir yapılandırma seçeneğinin değerini aç/kapat"
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-20 11:17+0200\n"
+"POT-Creation-Date: 2023-10-20 21:02+0200\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"
msgid "system actions"
msgstr ""
+msgid "get rlimit|rusage || suspend || waitpid <number>"
+msgstr ""
+
msgid "raw[get]: display system info"
msgstr ""
"\"zombie\" processes)"
msgstr ""
+msgid "number: number of processes to clean"
+msgstr ""
+
msgid "toggle value of a config option"
msgstr ""
COMMAND_CALLBACK(sys)
{
+ long value;
+ char *error;
+
/* make C compiler happy */
(void) pointer;
(void) data;
if (string_strcmp (argv[1], "get") == 0)
{
- COMMAND_MIN_ARGS(2, "get");
-
+ COMMAND_MIN_ARGS(3, "get");
if (string_strcmp (argv[2], "rlimit") == 0)
sys_display_rlimit ();
else if (string_strcmp (argv[2], "rusage") == 0)
if (string_strcmp (argv[1], "waitpid") == 0)
{
- sys_waitpid ();
+ COMMAND_MIN_ARGS(3, "waitpid");
+ error = NULL;
+ value = strtol (argv[2], &error, 10);
+ if (!error || error[0])
+ COMMAND_ERROR;
+ sys_waitpid ((int)value);
return WEECHAT_RC_OK;
}
hook_command (
NULL, "sys",
N_("system actions"),
- "get rlimit|rusage"
- " || suspend"
- " || waitpid",
+ N_("get rlimit|rusage"
+ " || suspend"
+ " || waitpid <number>"),
CMD_ARGS_DESC(
N_("raw[get]: display system info"),
N_("raw[rlimit]: display resource limits "
N_("raw[suspend]: suspend WeeChat and go back to the shell, by sending "
"signal SIGTSTP to the WeeChat process") ,
N_("raw[waitpid]: acknowledge the end of children processes "
- "(to prevent \"zombie\" processes)")),
+ "(to prevent \"zombie\" processes)"),
+ N_("number: number of processes to clean")),
"get rlimit|rusage"
" || suspend"
- " || waitpid",
+ " || waitpid 1|10|100|1000",
&command_sys, NULL, NULL);
hook_command (
NULL, "toggle",
*/
void
-sys_waitpid ()
+sys_waitpid (int number_processes)
{
int i;
+ if (number_processes < 1)
+ return;
+
/* acknowledge the end of up to 42 forked processes */
i = 0;
- while ((i < 42) && (waitpid (-1, NULL, WNOHANG) > 0))
+ while ((i < number_processes) && (waitpid (-1, NULL, WNOHANG) > 0))
{
i++;
}
extern void sys_setrlimit ();
extern void sys_display_rlimit ();
extern void sys_display_rusage ();
-extern void sys_waitpid ();
+extern void sys_waitpid (int number_processes);
#endif /* WEECHAT_SYS_H */
{
kill (xfer->child_pid, SIGKILL);
weechat_command (weechat_buffer_search_main (),
- "/mute /wait 100ms /sys waitpid");
+ "/mute /wait 100ms /sys waitpid 10");
xfer->child_pid = 0;
}