From 16092c007e8767b32c107d74d3ea3d238f5e65ec Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 6 Mar 2020 18:10:14 +0100 Subject: Preparing forks --- src/ft_warp_level.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/ft_warp_level.c') 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 #include #include -#include -#include 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)) -- cgit v1.2.3