aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_music.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_music.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ft_music.c b/src/ft_music.c
index 1be430b..234f86e 100644
--- a/src/ft_music.c
+++ b/src/ft_music.c
@@ -11,9 +11,21 @@
/* ************************************************************************** */
#include <cub3d.h>
+#include <unistd.h>
void
- ft_music(t_cub *cl)
+ ft_music_fork(char **mcmd_words, char *const envp[])
{
- (void)cl;
+ execve(*(mcmd_words + 0), mcmd_words, envp);
+}
+
+void
+ ft_enable_music(t_cub *cl)
+{
+ cl->isoldmus = 1;
+ cl->mpid = fork();
+ if (cl->mpid == 0)
+ {
+ ft_music_fork(cl->mlist.mcmd_words, cl->envp);
+ }
}