aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_music.c
diff options
context:
space:
mode:
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);
}