diff --git a/src/invoke_cmd/exec_pipeline.c b/src/invoke_cmd/exec_pipeline.c index 2f181ab..aa64f9d 100644 --- a/src/invoke_cmd/exec_pipeline.c +++ b/src/invoke_cmd/exec_pipeline.c @@ -6,7 +6,7 @@ /* By: dayano +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/21 13:14:15 by dayano #+# #+# */ -/* Updated: 2025/05/05 17:33:50 by dayano ### ########.fr */ +/* Updated: 2025/05/09 16:49:12 by dayano ### ########.fr */ /* */ /* ************************************************************************** */ @@ -67,7 +67,8 @@ static pid_t _fork_command(t_cmd *cmd, t_cmd *cmd_head, t_pipe_io *pipefds, _setup_stdout(cmd, pipefds->curr_fds); _setup_process_signals(SIG_DFL); if ((cmd->next != NULL) && is_redirect(cmd->next)) - redirect(cmd->next); + if (!redirect(cmd->next)) + exit(EXIT_FAILURE); if (is_builtin(cmd)) exit(execute_builtin(cmd, minish)); execute_cmd(cmd, minish);