diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-10 19:23:43 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-10 19:23:43 +0200 |
commit | 02a05f63d5d84e1adedf2352721c418ef3ba8c76 (patch) | |
tree | 337a793b34e30fa958e10482ec4f6f0680e5f025 /src/core/hook/wee-hook-connect.c | |
parent | 408901d772a92fbf62b2e6c8ad3345e36d316d9a (diff) | |
download | weechat-02a05f63d5d84e1adedf2352721c418ef3ba8c76.zip |
core: fix zombie processes remaining after the end of forked processes (closes #1994)
The clean of processes with waitpid() is now delayed after the kill(), so that
there are no more zombies.
In addition, this can be done manually if needed with `/sys waitpid`.
Diffstat (limited to 'src/core/hook/wee-hook-connect.c')
-rw-r--r-- | src/core/hook/wee-hook-connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hook/wee-hook-connect.c b/src/core/hook/wee-hook-connect.c index 81e402eca..d03fe4bec 100644 --- a/src/core/hook/wee-hook-connect.c +++ b/src/core/hook/wee-hook-connect.c @@ -270,7 +270,7 @@ hook_connect_free_data (struct t_hook *hook) if (HOOK_CONNECT(hook, child_pid) > 0) { kill (HOOK_CONNECT(hook, child_pid), SIGKILL); - waitpid (HOOK_CONNECT(hook, child_pid), NULL, 0); + hook_schedule_clean_children (); HOOK_CONNECT(hook, child_pid) = 0; } if (HOOK_CONNECT(hook, child_read) != -1) |