diff options
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r-- | src/ft_exit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c index 493e00f..d4fb4f9 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -16,6 +16,7 @@ #include <stddef.h> #include <stdlib.h> #include <stdint.h> +#include <pthread.h> static void ft_free_lists(t_cub *clist) @@ -63,6 +64,8 @@ int } ft_free_lists(clist); ft_printf("Exiting program\n"); + pthread_cancel(clist->tid); + pthread_exit(NULL); exit(exit_code); return (0); } |