aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_exit.c3
-rw-r--r--src/ft_music.c1
-rw-r--r--src/ft_treat_args.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index 493e00f..d4fb4f9 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -16,6 +16,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
+#include <pthread.h>
static void
ft_free_lists(t_cub *clist)
@@ -63,6 +64,8 @@ int
}
ft_free_lists(clist);
ft_printf("Exiting program\n");
+ pthread_cancel(clist->tid);
+ pthread_exit(NULL);
exit(exit_code);
return (0);
}
diff --git a/src/ft_music.c b/src/ft_music.c
index cc8d1ca..a4d588a 100644
--- a/src/ft_music.c
+++ b/src/ft_music.c
@@ -37,7 +37,6 @@ void
ft_printf("\n\n========= QWEQWE =========\n%s\n", cmd);
system(cmd);
ft_memdel((void**)&cmd);
- pthread_exit(NULL);
return (NULL);
}
diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c
index dab29ac..25c56d1 100644
--- a/src/ft_treat_args.c
+++ b/src/ft_treat_args.c
@@ -40,6 +40,7 @@ uint8_t
if (clist->mlist->ismusic)
{
pthread_create(&clist->tid, NULL, ft_music_thread, clist);
+ /* ft_music_thread(clist); */
}
ft_hooks_and_loops(clist->wlist, clist);
}