Skip to content

Commit

Permalink
Merge pull request #56 from JopjeKnopje/fix-47
Browse files Browse the repository at this point in the history
Add check in redirecitons
  • Loading branch information
JopjeKnopje authored Dec 22, 2023
2 parents f9f49a4 + 35a0307 commit c6a789e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/execute/pipeline.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: ivan-mel <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/05 02:54:41 by joppe #+# #+# */
/* Updated: 2023/12/22 13:00:45 by jboeve ######## odam.nl */
/* Updated: 2023/12/22 14:56:46 by jboeve ######## odam.nl */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -69,8 +69,10 @@ static int child_proc(t_meta *meta, t_cmd_list *cmd, t_hd_list **heredocs)
close(cmd->pipe[PIPE_WRITE]);
}
set_signal_mode(CHILD);
redirections(&cmd->content, heredocs);
status = run_command(meta, &cmd->content);
if (!redirections(&cmd->content, heredocs))
status = 1;
else
status = run_command(meta, &cmd->content);
if (status)
perror("megashell");
return (status);
Expand Down

0 comments on commit c6a789e

Please sign in to comment.