fixed closing all pipe fds

This commit is contained in:
mdev9
2024-04-30 14:05:25 +02:00
parent df6bef58dc
commit f67d334503
6 changed files with 34 additions and 22 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/05 18:19:26 by marde-vr #+# #+# */
/* Updated: 2024/04/29 13:00:22 by tomoron ### ########.fr */
/* Updated: 2024/04/30 14:03:28 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -73,3 +73,13 @@ int file_access(t_msh *msh, int *found)
}
return (1);
}
void close_all_pipes(t_msh *msh, int cmd_count, int i)
{
i = 0;
while (i < cmd_count)
{
close_pipe_fds(msh, i);
i++;
}
}