fds and sigint

This commit is contained in:
Loic Deridder
2025-02-13 09:10:54 +01:00
parent b57118d0ae
commit 842e31c68f
7 changed files with 42 additions and 13 deletions

View File

@@ -65,6 +65,10 @@ int exec(t_ast_n *node)
char *path;
expand_node(node);
if (node->msh->here_fd != -1)
close(node->msh->here_fd);
if (node->msh->hist != -1)
close(node->msh->hist);
path = find_path(node->cmd, node->msh->env);
if (!path)
return_error(node->cmd, "command not found", 127, node);