diff options
Diffstat (limited to 'src/ft_e_externs.c')
-rw-r--r-- | src/ft_e_externs.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ft_e_externs.c b/src/ft_e_externs.c index aa67d9a..bf56878 100644 --- a/src/ft_e_externs.c +++ b/src/ft_e_externs.c @@ -59,15 +59,11 @@ ft_e_extern_child(const char *fullpath, t_msh *msh) { int32_t ret; - char arg[2][256]; - ft_strlcpy(arg[0], "/bin/ls -l", ft_strlen("/bin/ls -l")); - arg[0][2] = '\0'; - arg[1][0] = 0; (void)fullpath; (void)ptr; ft_dup_redirs(ptr, msh); - ret = execve("/bin/ls", (char *const*)arg, msh->envp); + ret = execve("/bin/ls", argv, NULL); /* TODO: handle execve failed */ ft_lcom_clear(&msh->curr); ft_s_destroy(msh); |