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/operation.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/operation.c')
| -rw-r--r-- | src/eval/operation.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/eval/operation.c b/src/eval/operation.c index d8206b6..df54346 100644 --- a/src/eval/operation.c +++ b/src/eval/operation.c @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/17 15:27:22 by charles #+# #+# */ -/* Updated: 2020/10/06 16:11:54 by cacharle ### ########.fr */ +/* Updated: 2020/10/06 17:21:38 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,13 +22,13 @@ int eval_operation(int fds[2], t_env env, t_ast *ast) left_fds[FD_WRITE] = FD_NONE; right_fds[FD_READ] = FD_NONE; right_fds[FD_WRITE] = fds[FD_WRITE]; - if ((status = eval(left_fds, env, ast->op.left, NULL, FD_NONE)) == EVAL_FATAL) + if ((status = eval(left_fds, env, ast->op.left)) == EVAL_FATAL) return (EVAL_FATAL); g_state.last_status = status; if ((ast->op.sep == TAG_AND && status != 0) || (ast->op.sep == TAG_OR && status == 0)) return (status); - return (eval(right_fds, env, ast->op.right, NULL, FD_NONE)); + return (eval(right_fds, env, ast->op.right)); } /* pid_t run_piped_child(t_env env, t_ast *ast, int copied, int closed) */ @@ -76,7 +76,7 @@ int eval_pipeline(int fds[2], t_env env, t_ast *ast) close(p[FD_READ]); fds[0] = FD_NONE; fds[1] = FD_NONE; - exit(eval(fds, env, curr->data, NULL, FD_NONE)); + exit(eval(fds, env, curr->data)); } close(p[FD_WRITE]); if (prev_output != STDIN_FILENO) @@ -97,7 +97,7 @@ int eval_pipeline(int fds[2], t_env env, t_ast *ast) close(p[FD_WRITE]); fds[0] = FD_NONE; fds[1] = FD_NONE; - exit(eval(fds, env, curr->data, NULL, FD_NONE)); + exit(eval(fds, env, curr->data)); } close(p[FD_READ]); |
