aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r--src/ft_exit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index 23cd466..92da2a6 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 <signal.h>
#include <pthread.h>
static void
@@ -63,7 +64,10 @@ int
if (clist->isoldmus && clist->wlist.inited)
{
pthread_cancel(clist->tid);
- pthread_join(clist->tid, NULL);
+ if (FT_OS == 1)
+ pthread_kill(clist->tid, SIGTERM);
+ else
+ pthread_join(clist->tid, NULL);
}
ft_free_lists(clist);
ft_printf("Exiting program\n");