diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-14 20:48:50 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-14 20:48:50 +0200 |
| commit | 8e40323db9715621d8ab45ff6d943c2eeba46ea0 (patch) | |
| tree | 010828d6a75dfaaf94535035dc50b6a2a55aa12e /src/eval/operation.c | |
| parent | 3693acaff9fbf3f34dc2907e95dd221d5a8bc9e4 (diff) | |
| download | minishell-path.tar.gz minishell-path.tar.bz2 minishell-path.zip | |
Removing path hash table, replacing it by brute force searchpath
Diffstat (limited to 'src/eval/operation.c')
| -rw-r--r-- | src/eval/operation.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/eval/operation.c b/src/eval/operation.c index eaafcf8..8c80033 100644 --- a/src/eval/operation.c +++ b/src/eval/operation.c @@ -6,13 +6,13 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/17 15:27:22 by charles #+# #+# */ -/* Updated: 2020/09/13 20:38:26 by charles ### ########.fr */ +/* Updated: 2020/09/14 19:39:16 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #include "eval.h" -int eval_operation(int fds[2], t_env env, t_path path, t_ast *ast) +int eval_operation(int fds[2], t_env env, t_ast *ast) { int status; int left_fds[2]; @@ -31,9 +31,9 @@ int eval_operation(int fds[2], t_env env, t_path path, t_ast *ast) pid_t left_pid; pid_t right_pid; - eval(left_fds, env, path, ast->op.left, &left_pid); + eval(left_fds, env, ast->op.left, &left_pid); close(p[FD_WRITE]); - eval(right_fds, env, path, ast->op.right, &right_pid); + eval(right_fds, env, ast->op.right, &right_pid); close(p[FD_READ]); pid_t finished; @@ -49,12 +49,12 @@ int eval_operation(int fds[2], t_env env, t_path path, t_ast *ast) } return (0); } - if ((status = eval(left_fds, env, path, ast->op.left, NULL)) == EVAL_FATAL) + if ((status = eval(left_fds, env, ast->op.left, NULL)) == EVAL_FATAL) return (EVAL_FATAL); g_last_status = status; if ((ast->op.sep == TAG_AND && status != 0) || (ast->op.sep == TAG_PIPE && status != 0) || (ast->op.sep == TAG_OR && status == 0)) return (status); - return (eval(right_fds, env, path, ast->op.right, NULL)); + return (eval(right_fds, env, ast->op.right, NULL)); } |
