fork_execve
This commit is contained in:
parent
7cad14f636
commit
b49a8e5368
@ -6,7 +6,7 @@
|
||||
/* By: whaffman <whaffman@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/02/05 16:21:39 by whaffman #+# #+# */
|
||||
/* Updated: 2025/02/09 16:20:04 by willem ######## odam.nl */
|
||||
/* Updated: 2025/02/11 13:16:13 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -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