works now (in my dreams)

This commit is contained in:
mdev9
2024-04-18 18:31:01 +02:00
parent 9053276342
commit 5da5968deb
2 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/05 18:15:27 by marde-vr #+# #+# */
/* Updated: 2024/04/18 17:56:05 by tomoron ### ########.fr */
/* Updated: 2024/04/18 18:25:20 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -24,7 +24,7 @@ void redirect_input(t_msh *msh, int i)
else
{
fprintf(stderr, "redirecting pipe input\n");
fprintf(stderr, "input of cmd %d: 0 -> %d\n", i, msh->fds[i - 1][0]);
fprintf(stderr, "input of cmd %d: %d -> 0\n", i, msh->fds[i - 1][0]);
if (dup2(msh->fds[i - 1][0], 0) < 0)
{
perror("dup2"); //debug