close cmd fd after each exec
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
|
||||
/* Updated: 2021/12/16 15:55:36 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/12/20 18:08:16 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -97,9 +97,9 @@ static pid_t pipeline_exec(t_cmd *pipeline[], t_all *c)
|
||||
if (ret != EXIT_SUCCESS)
|
||||
exit_free(c, ret);
|
||||
}
|
||||
close_cmd_fd(pipeline[i]);
|
||||
i++;
|
||||
}
|
||||
close_pipeline_fd(c->pipeline);
|
||||
i -= 1;
|
||||
if (pipeline[i]->error)
|
||||
set_last_exit_status(pipeline[i]->error);
|
||||
|
||||
Reference in New Issue
Block a user