Merge branch 'test_execve' into quinten
This commit is contained in:
commit
97b6321983
@ -38,7 +38,7 @@ void builtin_export(t_minishell *minishell)
|
||||
environment_add(&(minishell->environment), arr[0], arr[1]);
|
||||
ft_free_arr(arr);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ void fork_execve(t_minishell *minishell, char *path, char **argv)
|
||||
{
|
||||
pid_t pid;
|
||||
int status;
|
||||
|
||||
|
||||
pid = fork();
|
||||
if (pid == 0)
|
||||
{
|
||||
@ -83,7 +83,7 @@ void fork_execve(t_minishell *minishell, char *path, char **argv)
|
||||
void simple_builtins(t_minishell *minishell)
|
||||
{
|
||||
char *path;
|
||||
|
||||
|
||||
if (cmp_value(minishell->tokens, "clear"))
|
||||
printf("\033[2J\033[1;1H");
|
||||
else if (cmp_value(minishell->tokens, "env"))
|
||||
@ -103,7 +103,7 @@ void simple_builtins(t_minishell *minishell)
|
||||
else
|
||||
{
|
||||
printf("found excutable: %s\n", path);
|
||||
free(path);
|
||||
fork_execve(minishell, path, ft_split(((t_token *)minishell->tokens->content)->value, ' '));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user