heredocs + some leaks

This commit is contained in:
Loic Deridder
2025-02-11 11:07:57 +01:00
parent 0c76cc2422
commit 1ac81bef26
6 changed files with 244 additions and 52 deletions

View File

@@ -56,7 +56,9 @@ static void interpret_cmd(char **input, t_msh *msh)
ft_free(input);
return ;
}
msh->here_fd = open(".heredoc", O_RDONLY);
msh->ex_code = execute_command(msh->head);
close(msh->here_fd);
unlink(".heredoc");
free_ast(msh->head);
msh->head = NULL;