From ce42f762aa1b3ff65ad84447d498b5a2881008b6 Mon Sep 17 00:00:00 2001 From: Hubert Hirtz <hubert.hirtz@laposte.net> Date: Fri, 18 Oct 2019 22:58:46 +0200 Subject: [PATCH] Fix zombie processes --- randomfeh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/randomfeh.c b/randomfeh.c index 14ec8c9..fa8dbb4 100644 --- a/randomfeh.c +++ b/randomfeh.c @@ -4,6 +4,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/wait.h> #include <time.h> #include <unistd.h> @@ -46,6 +47,7 @@ spawn(const char *bin, char **argv) execv(bin, argv); exit(0); } + wait(0); } int -- GitLab