Skip to content

Commit

Permalink
redirection smal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
user42 committed Sep 20, 2020
1 parent 66743d5 commit 3d895e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srcs/redirection/redirection_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int check_redirections(t_list *redirections, int in, int out)
close(fd[i]);
else if (i == fd_pos[W_END] && (close(in) || 1))
redirect_pipe_end(fd[i], STDIN_FILENO);
else if (i == fd_pos[R_END])
else if (i == fd_pos[R_END] && (close(out) || 1))
redirect_pipe_end(fd[i], STDOUT_FILENO);
redirections = redirections->next;
i++;
Expand Down

0 comments on commit 3d895e8

Please sign in to comment.