From 2e69f9b0e278c374da4a1f54df1576132a3d521c Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 24 Apr 2020 17:00:14 +0200 Subject: Retry --- src/ft_exit.c | 16 +++++++++++++--- 1 file 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); } } -- cgit v1.2.3