aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z1r3p1.le-101.fr>2020-03-05 19:45:26 +0100
committerRudy Bousset <rbousset@z1r3p1.le-101.fr>2020-03-05 19:45:26 +0100
commit528526dece384c9078d888a904c3fe96f1b0845c (patch)
tree059bf5332cd463578bbedf1aaa22a06d2b4733eb /src/ft_exit.c
parentDARK (diff)
download42-cub3d-528526dece384c9078d888a904c3fe96f1b0845c.tar.gz
42-cub3d-528526dece384c9078d888a904c3fe96f1b0845c.tar.bz2
42-cub3d-528526dece384c9078d888a904c3fe96f1b0845c.tar.xz
42-cub3d-528526dece384c9078d888a904c3fe96f1b0845c.tar.zst
42-cub3d-528526dece384c9078d888a904c3fe96f1b0845c.zip
Baleck
Diffstat (limited to '')
-rw-r--r--src/ft_exit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index ca5201c..6726fb1 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -68,7 +68,10 @@ int
if (clist->isoldmus && clist->wlist.inited)
{
pthread_cancel(clist->tid);
- pthread_join(clist->tid, NULL);
+ if (FT_OS == 2)
+ pthread_join(clist->tid, NULL);
+ else
+ pthread_kill(clist->tid, SIGTERM);
}
ft_free_lists(clist);
ft_printf("Exiting program\n");