aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_music.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-17 17:15:32 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-17 17:15:32 +0100
commit05ad2085ab6ce4ffb280b21ce3f321b2bd75aa9e (patch)
treec6c521c8f2ad8df4477005b8225427b7459daf32 /src/ft_music.c
parentMerge branch 'back-to-pthread' (diff)
download42-cub3d-05ad2085ab6ce4ffb280b21ce3f321b2bd75aa9e.tar.gz
42-cub3d-05ad2085ab6ce4ffb280b21ce3f321b2bd75aa9e.tar.bz2
42-cub3d-05ad2085ab6ce4ffb280b21ce3f321b2bd75aa9e.tar.xz
42-cub3d-05ad2085ab6ce4ffb280b21ce3f321b2bd75aa9e.tar.zst
42-cub3d-05ad2085ab6ce4ffb280b21ce3f321b2bd75aa9e.zip
fps counter is bav
Diffstat (limited to '')
-rw-r--r--src/ft_music.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_music.c b/src/ft_music.c
index 1a3da63..7a2d800 100644
--- a/src/ft_music.c
+++ b/src/ft_music.c
@@ -26,7 +26,8 @@ static void
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
cl = (t_cub *)vargp;
while (1)
- system(cl->mlist.music_cmd);
+ if (system(cl->mlist.music_cmd) != 0)
+ pthread_exit(NULL);
return(NULL);
}