aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_exit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index 3ba1237..973abca 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -16,6 +16,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <signal.h>
+#include <sys/wait.h>
#include <stdint.h>
static void
@@ -67,6 +68,7 @@ int
if (clist->isoldmus && clist->wlist.inited)
{
kill(clist->mpid, SIGTERM);
+ wait(&clist->mpid);
}
ft_free_lists(clist);
ft_printf("Exiting program\n");