file perm error

This commit is contained in:
Loic Deridder
2025-02-13 15:41:12 +01:00
parent bee6feb644
commit fbcc5403f2
7 changed files with 94 additions and 38 deletions

View File

@@ -44,7 +44,11 @@ void exec_pchild(int *pipes, int index, t_ast_n *pcmd, int cmds)
dup2(pipes[1], STDOUT_FILENO);
close(pipes[0]);
close(pipes[1]);
handle_redir(pcmd);
if (handle_redir(pcmd))
{
free_child(pcmd->msh);
exit(1);
}
if (pcmd->state == _CMD)
exec_pcmd(pcmd);
else if (pcmd->state == _SUBSH)