🔨」 fix: aled

This commit is contained in:
yosyo
2024-08-09 19:06:14 +02:00
parent 47e490175b
commit f22d5653d8
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/15 21:03:31 by mmoussou #+# #+# */
/* Updated: 2024/07/18 14:44:07 by mmoussou ### ########.fr */
/* Updated: 2024/08/09 17:59:41 by mmoussou ### ########.fr */
/* */
/* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/01 14:55:06 by mmoussou #+# #+# */
/* Updated: 2024/08/01 16:38:31 by mmoussou ### ########.fr */
/* Updated: 2024/08/09 18:59:15 by mmoussou ### ########.fr */
/* */
/* ************************************************************************** */
@ -41,7 +41,7 @@ int exec_fork_cmd(t_cmd *cmd, char **env, t_env *env_t, int pipe_fd[2])
if (!fork_pid)
{
__fork_single_cmd(cmd, env, env_t, exec);
free_exec(env_t, env);
free_exit(env_t, env);
exit(get_exit_code(-1));
}
return (fork_pid);
@ -105,7 +105,7 @@ t_exec exec_pipe(t_exec exec, t_list *list_cmd, t_env *env)
((t_cmd *)(list_cmd->next->content))->infile = exec.pipe_fd[0];
exec.status = exec_fork_cmd(list_cmd->content, exec.env_array, \
env, exec.pipe_fd);
__close(list_cmd->content, exec.pipe_fd[0], exec.pipe_fd[1]);
__close(list_cmd->content, -1, -1);
if (exec.status != -1)
exec.i++;
list_cmd = list_cmd->next;