working on fixing pipes
This commit is contained in:
@ -6,13 +6,13 @@
|
||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/05 18:15:27 by marde-vr #+# #+# */
|
||||
/* Updated: 2024/04/01 13:20:54 by marde-vr ### ########.fr */
|
||||
/* Updated: 2024/04/01 20:08:48 by marde-vr ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "minishell.h"
|
||||
|
||||
void redirect_input(t_msh *msh, int i)
|
||||
void redirect_input(t_msh *msh)
|
||||
{
|
||||
if (/*msh->in_type != PIPE*/ 1)
|
||||
{
|
||||
@ -22,7 +22,7 @@ void redirect_input(t_msh *msh, int i)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dup2(msh->fds[i - 1][0], 0) < 0)
|
||||
if (dup2(msh->in_fd, 0) < 0)
|
||||
ft_exit(msh, 1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user