diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_sfx_pain.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ft_sfx_pain.c b/src/ft_sfx_pain.c index cb68108..68340c5 100644 --- a/src/ft_sfx_pain.c +++ b/src/ft_sfx_pain.c @@ -31,9 +31,12 @@ void pthread_mutex_lock(&sfx->pain_mutex); ref = (ref > 201) ? (0) : (ref + 1); if (ref % 3) - system(sfx->pain_one); - else - system(sfx->pain_two); + { + if (system(sfx->pain_one)) + pthread_exit(NULL); + } + else if (system(sfx->pain_two)) + pthread_exit(NULL); } return (NULL); } |