diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval/operation.c | 3 | ||||
| -rw-r--r-- | src/parser/parser.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/eval/operation.c b/src/eval/operation.c index f1daa0b..826727a 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/09 16:12:14 by cacharle ### ########.fr */ +/* Updated: 2020/10/09 20:39:33 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -69,6 +69,7 @@ int eval_pipeline(t_env env, t_ast *ast) int pid; pipes[PIPES_PREV_OUTPUT] = STDIN_FILENO; + pipes[FD_READ] = -1; curr = ast->pipeline; while (curr->next != NULL) { diff --git a/src/parser/parser.c b/src/parser/parser.c index be71097..9493955 100644 --- a/src/parser/parser.c +++ b/src/parser/parser.c @@ -6,7 +6,7 @@ /* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/17 18:09:04 by nahaddac #+# #+# */ -/* Updated: 2020/10/09 16:10:31 by cacharle ### ########.fr */ +/* Updated: 2020/10/09 20:39:47 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -226,8 +226,8 @@ t_parsed *parse_expr(t_tok_lst *input) tmp = parse_redir(input, &parsed->ast->redirs); if (tmp == NULL || tmp->syntax_error) return (tmp); - free(tmp); input = tmp->rest; + free(tmp); } parsed->rest = input; return (parsed); |
