aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ft_exit.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index 0fcc9dc..988a0cf 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -46,13 +46,23 @@ static void
if (clist->isoldmus && clist->wlist.inited)
{
- system(FT_SND_TERM_CMD);
+ if (FT_OS == 2)
+ {
+ pthread_cancel(clist->sfx[i].tid);
+ }
+ else
+ system(FT_SND_TERM_CMD);
}
i = -1;
while (++i < FT_TOTAL_SFX)
{
- pthread_mutex_unlock(&clist->sfx[i].mutex);
- system(FT_SND_TERM_CMD);
+ pthread_mutex_destroy(&clist->sfx[i].mutex);
+ if (FT_OS == 2)
+ {
+ pthread_cancel(clist->sfx[i].tid);
+ }
+ else
+ system(FT_SND_TERM_CMD);
}
}