From 02a05f63d5d84e1adedf2352721c418ef3ba8c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 10 Oct 2023 19:23:43 +0200 Subject: 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`. --- src/core/hook/wee-hook-connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hook/wee-hook-connect.c') 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) -- cgit v1.2.3