From 5fc0af6bb313bba4878af199e5fe3eeb5629f517 Mon Sep 17 00:00:00 2001 From: Sergio Date: Thu, 30 Oct 2025 22:39:22 +0100 Subject: [PATCH] update: minishell execution is now dependant on minishell.exit --- include/core.h | 3 ++- src/minishell.c | 23 ++++++++++------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/include/core.h b/include/core.h index b8234f9..9e6eefd 100644 --- a/include/core.h +++ b/include/core.h @@ -6,7 +6,7 @@ /* By: sede-san exit) { line = readline("minishell > "); - if (!*line) + if (*line) { - free(line); - continue ; + add_history(line); + command = parse(line, minishell); + execute(command, minishell); } - add_history(line); - parse(line, minishell); - if (!ft_strcmp(line, "exit")) - break ; - // printf("%s\n", line); - free(line); + ft_free((void **)&line); } - free(line); return (minishell->exit_status); }