diff --git a/42sh/src/exec/redirect_dless.c b/42sh/src/exec/redirect_dless.c index 5bcd3aa3..60cb85c2 100644 --- a/42sh/src/exec/redirect_dless.c +++ b/42sh/src/exec/redirect_dless.c @@ -22,7 +22,7 @@ int redirect_dless(t_redir *redir) DG("redir @ %p", redir); write(fds[PIPE_WRITE], str, ft_strlen(str)); close(fds[PIPE_WRITE]); - dup2(fds[PIPE_READ], 0); + dup2(fds[PIPE_READ], redir->n); close(fds[PIPE_READ]); return (0); } diff --git a/42sh/src/parser/add_redir.c b/42sh/src/parser/add_redir.c index 9254025e..3cdc9a25 100644 --- a/42sh/src/parser/add_redir.c +++ b/42sh/src/parser/add_redir.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 16:39:05 by ariard #+# #+# */ -/* Updated: 2017/03/13 16:23:35 by jhalford ### ########.fr */ +/* Updated: 2017/03/13 16:24:44 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */