diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-15 01:02:32 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-15 01:02:32 +0100 |
commit | 9f35e7fab50809cd74e3bfffff67a81023abc837 (patch) | |
tree | 8ed891643db7c95aa7f72a1bab2a5f02efbbd078 /src/ft_warp_level.c | |
parent | Looks like I have to pthread this shit (diff) | |
download | 42-cub3d-9f35e7fab50809cd74e3bfffff67a81023abc837.tar.gz 42-cub3d-9f35e7fab50809cd74e3bfffff67a81023abc837.tar.bz2 42-cub3d-9f35e7fab50809cd74e3bfffff67a81023abc837.tar.xz 42-cub3d-9f35e7fab50809cd74e3bfffff67a81023abc837.tar.zst 42-cub3d-9f35e7fab50809cd74e3bfffff67a81023abc837.zip |
I need a macOS
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r-- | src/ft_warp_level.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index 56d4d67..dd4ed1b 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -39,7 +39,6 @@ static void ft_memdel((void**)&ml->mapl); ft_free_sprites(ml->sprite_path); ft_free_words(ml->map); - ft_free_words(ml->mcmd_words); } static void @@ -74,15 +73,15 @@ static void { if (isoldmus && !cl->mlist.ismusic) { - kill(cl->mpid, SIGTERM); - wait(&cl->mpid); + pthread_cancel(cl->mtid); + pthread_join(cl->mtid, NULL); cl->isoldmus = 0; } else if (isoldmus && cl->mlist.ismusic && ft_strncmp(tmp_mup, cl->mlist.music_path, ft_strlen(tmp_mup) + 1)) { - kill(cl->mpid, SIGTERM); - wait(&cl->mpid); + pthread_cancel(cl->mtid); + pthread_join(cl->mtid, NULL); ft_enable_music(cl); } else if (isoldmus && cl->mlist.ismusic |