aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-06 19:03:24 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-06 19:03:51 +0100
commita35b258841cde7884f5bb71d5ae0951d5e3f27b7 (patch)
treeb7d1c6801ba924e129b3d008091a3f1b2e0adc95 /src/ft_exit.c
parentName is Cub3D anyway (diff)
download42-cub3d-a35b258841cde7884f5bb71d5ae0951d5e3f27b7.tar.gz
42-cub3d-a35b258841cde7884f5bb71d5ae0951d5e3f27b7.tar.bz2
42-cub3d-a35b258841cde7884f5bb71d5ae0951d5e3f27b7.tar.xz
42-cub3d-a35b258841cde7884f5bb71d5ae0951d5e3f27b7.tar.zst
42-cub3d-a35b258841cde7884f5bb71d5ae0951d5e3f27b7.zip
fork(3) going well, freed a leak
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r--src/ft_exit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index c7b2275..3ba1237 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -15,6 +15,7 @@
#include <mlx.h>
#include <stddef.h>
#include <stdlib.h>
+#include <signal.h>
#include <stdint.h>
static void
@@ -65,7 +66,7 @@ int
}
if (clist->isoldmus && clist->wlist.inited)
{
- /* kill fork() here */
+ kill(clist->mpid, SIGTERM);
}
ft_free_lists(clist);
ft_printf("Exiting program\n");