diff options
Diffstat (limited to 'src/ft_music.c')
-rw-r--r-- | src/ft_music.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ft_music.c b/src/ft_music.c index f1801f9..a3e2120 100644 --- a/src/ft_music.c +++ b/src/ft_music.c @@ -16,16 +16,14 @@ #include <unistd.h> void - ft_music_fork(char **mcmd_words) + ft_music_fork(char **mcmd_words, char *const envp[]) { /* execve(2) here */ + char *arg[3]; - char *arg[4]; - - arg[0] = "/bin/sh"; - arg[1] = "-c"; - arg[2] = "aplay ./media/sound/DEVANT-LES-KAISSONS.wav"; - arg[3] = NULL; + arg[0] = "/usr/bin/aplay"; + arg[1] = "./media/sound/DEVANT-LES-KAISSONS.wav"; + arg[2] = NULL; (void)mcmd_words; - execve("/bin/sh", &arg[0], NULL); + execve("/usr/bin/aplay", &arg[0], envp); } |