diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-06 18:10:14 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-06 18:10:14 +0100 |
commit | 16092c007e8767b32c107d74d3ea3d238f5e65ec (patch) | |
tree | b46cb8825ea0f7071ee4b48f37f78f853b13414c /src/ft_warp_level.c | |
parent | No pthread in Makefile (diff) | |
download | 42-cub3d-16092c007e8767b32c107d74d3ea3d238f5e65ec.tar.gz 42-cub3d-16092c007e8767b32c107d74d3ea3d238f5e65ec.tar.bz2 42-cub3d-16092c007e8767b32c107d74d3ea3d238f5e65ec.tar.xz 42-cub3d-16092c007e8767b32c107d74d3ea3d238f5e65ec.tar.zst 42-cub3d-16092c007e8767b32c107d74d3ea3d238f5e65ec.zip |
Preparing forks
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r-- | src/ft_warp_level.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index 808b346..4d1ca12 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -16,8 +16,6 @@ #include <stddef.h> #include <stdint.h> #include <mlx.h> -#include <signal.h> -#include <pthread.h> static void ft_del_map(t_map *ml) @@ -66,16 +64,13 @@ static void { if (isoldmus && !cl->mlist.ismusic) { - pthread_cancel(cl->tid); - pthread_join(cl->tid, NULL); + /* stop fork() here */ cl->isoldmus = 0; } else if (isoldmus && cl->mlist.ismusic && ft_strncmp(tmp_mup, cl->mlist.music_path, ft_strlen(tmp_mup) + 1)) { - pthread_cancel(cl->tid); - pthread_join(cl->tid, NULL); - pthread_create(&cl->tid, NULL, ft_music_thread, cl); + /* stop and recreate fork() here */ } else if (isoldmus && cl->mlist.ismusic && !ft_strncmp(tmp_mup, cl->mlist.music_path, ft_strlen(tmp_mup) + 1)) |