This commit is contained in:
Loic Deridder
2025-02-12 15:53:22 +01:00
parent e6ef9f494b
commit e60a03293e
3 changed files with 4 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ void exec_pchild(int *pipes, int index, t_ast_n *pcmd, int cmds)
ret = 0;
if (index < cmds - 1)
dup2(pipes[1], STDOUT_FILENO);
close(pcmd->msh->hist);
close(pipes[0]);
close(pipes[1]);
handle_redir(pcmd);

View File

@@ -52,6 +52,8 @@ void free_msh(t_msh *msh)
free_tab(msh->env);
if (msh->hist != -1)
close(msh->hist);
if (msh->here_fd != -1)
close(msh->here_fd);
free(msh->input);
free(msh);
}