aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_trap.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-24 18:37:59 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-24 18:37:59 +0200
commit40ca3988b960128deb2c38b444699e5d8e2f85eb (patch)
treeffefb5f5adfbf2741929a63621823468e81ea6fd /src/ft_sfx_trap.c
parentCleaner (diff)
download42-cub3d-40ca3988b960128deb2c38b444699e5d8e2f85eb.tar.gz
42-cub3d-40ca3988b960128deb2c38b444699e5d8e2f85eb.tar.bz2
42-cub3d-40ca3988b960128deb2c38b444699e5d8e2f85eb.tar.xz
42-cub3d-40ca3988b960128deb2c38b444699e5d8e2f85eb.tar.zst
42-cub3d-40ca3988b960128deb2c38b444699e5d8e2f85eb.zip
Works but leaks
Diffstat (limited to 'src/ft_sfx_trap.c')
-rw-r--r--src/ft_sfx_trap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ft_sfx_trap.c b/src/ft_sfx_trap.c
index 5ae39f0..60cd7c6 100644
--- a/src/ft_sfx_trap.c
+++ b/src/ft_sfx_trap.c
@@ -28,7 +28,7 @@ void
{
pthread_mutex_lock(&sfx[4].mutex);
if (system(sfx[4].cmd))
- pthread_exit(NULL);
+ pthread_cancel(pthread_self());
}
return (NULL);
}