diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-06 17:23:23 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-06 17:23:23 +0200 |
| commit | 89bd998bcf0839a83daf16ab9b1e8ae568a8a9f2 (patch) | |
| tree | 84627975d6a6379f5a56b31eeaee90f55a231d1d /src/eval/cmd.c | |
| parent | fc862343cc5d0c305811fe23311084ae3702ed42 (diff) | |
| download | minishell-89bd998bcf0839a83daf16ab9b1e8ae568a8a9f2.tar.gz minishell-89bd998bcf0839a83daf16ab9b1e8ae568a8a9f2.tar.bz2 minishell-89bd998bcf0839a83daf16ab9b1e8ae568a8a9f2.zip | |
Removing previous pipe bloat
Diffstat (limited to 'src/eval/cmd.c')
| -rw-r--r-- | src/eval/cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eval/cmd.c b/src/eval/cmd.c index 5cabbba..8c08b78 100644 --- a/src/eval/cmd.c +++ b/src/eval/cmd.c @@ -6,7 +6,7 @@ /* By: charles <charles@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/14 10:41:31 by charles #+# #+# */ -/* Updated: 2020/09/16 19:39:42 by charles ### ########.fr */ +/* Updated: 2020/10/06 17:18:20 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,7 +30,7 @@ int wrapped_cmd(t_fork_param_cmd *param) return (status); } -int eval_cmd(int fds[2], t_env env, t_ast *ast, pid_t *child_pid, int fd_to_close) +int eval_cmd(int fds[2], t_env env, t_ast *ast) { t_fork_param_cmd param; char **argv; @@ -44,7 +44,7 @@ int eval_cmd(int fds[2], t_env env, t_ast *ast, pid_t *child_pid, int fd_to_cl if (argv[0] == NULL) return (0); param.builtin = builtin_search_func(argv[0]); - if (param.builtin != NULL && !param.builtin->forked && child_pid == NULL) + if (param.builtin != NULL && !param.builtin->forked) return (param.builtin->func(argv, env)); if (param.builtin == NULL @@ -56,7 +56,7 @@ int eval_cmd(int fds[2], t_env env, t_ast *ast, pid_t *child_pid, int fd_to_cl param.argv = argv; param.env = env; - status = fork_wrap(fds, ¶m, (t_wrapped_func)wrapped_cmd, child_pid, fd_to_close); + status = fork_wrap(fds, ¶m, (t_wrapped_func)wrapped_cmd); ft_split_destroy(argv); g_state.last_status = status; return (status); |
