diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-06 15:57:29 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-06 15:57:29 +0200 |
| commit | 54394620893f7245c7697a57d724d430d06b57d1 (patch) | |
| tree | 8e51b671bcb2cdba4306165eaba39cc1f99f1cf4 /src/eval/eval.c | |
| parent | 930bb63605984abeda8c887a6333109c004d3b00 (diff) | |
| download | minishell-54394620893f7245c7697a57d724d430d06b57d1.tar.gz minishell-54394620893f7245c7697a57d724d430d06b57d1.tar.bz2 minishell-54394620893f7245c7697a57d724d430d06b57d1.zip | |
Added pipeline ast and pipeline evaluation (not working when first command is infinite)
Diffstat (limited to 'src/eval/eval.c')
| -rw-r--r-- | src/eval/eval.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/eval/eval.c b/src/eval/eval.c index 2775f9e..d2eb822 100644 --- a/src/eval/eval.c +++ b/src/eval/eval.c @@ -6,7 +6,7 @@ /* By: charles <me@cacharle.xyz> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/09/13 20:38:06 by charles #+# #+# */ -/* Updated: 2020/09/16 16:29:20 by charles ### ########.fr */ +/* Updated: 2020/10/06 12:57:33 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -74,11 +74,13 @@ int fork_wrap( int eval(int fds[2], t_env env, t_ast *ast, pid_t *child_pid, int fd_to_close) { - if (ast->tag == AST_PARENT) - return (eval_parenthesis(fds, env, ast, child_pid, fd_to_close)); if (ast->tag == AST_OP) return (eval_operation(fds, env, ast)); if (ast->tag == AST_CMD) return (eval_cmd(fds, env, ast, child_pid, fd_to_close)); + if (ast->tag == AST_PIPELINE) + return (eval_pipeline(fds, env, ast)); + if (ast->tag == AST_PARENT) + return (eval_parenthesis(fds, env, ast, child_pid, fd_to_close)); return (EVAL_FATAL); } |
