replaced occurrences of last exit_status

+ deleted envp comments
+ WIP Macro exit status
+ TODO : Invalid free of environ in readline
This commit is contained in:
LuckyLaszlo
2021-11-27 12:59:16 +01:00
parent 843b6d84c5
commit 3baf91afb3
16 changed files with 59 additions and 65 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
/* Updated: 2021/11/18 14:08:56 by lperrey ### ########.fr */
/* Updated: 2021/11/27 11:07:19 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -37,7 +37,7 @@ int simple_command_builtin(t_cmd *cmd, t_all *c)
if (dup2(cmd->fd_out, STDOUT_FILENO) == -1)
return (ft_reti_perror(EXIT_FAILURE, "dup2()"));
}
c->last_exit_status = cmd->builtin_func(ft_2d_arrlen(cmd->argv), cmd->argv, c);
set_last_exit_status(cmd->builtin_func(ft_2d_arrlen(cmd->argv), cmd->argv, c));
if (!restore_stdio(stdin_dup, stdout_dup))
return (EXIT_FAILURE);
return (EXIT_SUCCESS);