envp dup array

+ c->last_exit_status
This commit is contained in:
LuckyLaszlo
2021-10-24 10:23:20 +02:00
parent 39de10e001
commit 906074d2cb
7 changed files with 67 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/10 05:01:22 by lperrey #+# #+# */
/* Updated: 2021/10/15 08:45:33 by lperrey ### ########.fr */
/* Updated: 2021/10/22 14:49:01 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,8 +17,7 @@ int builtin_exit(int argc, char *argv[], t_all *c) // WIP
unsigned char status;
int i;
status = 0; // # should not return '0' by default, but the last exit code value (same as $?)
// status = c->last_exit_value; // LIKE THIS
status = c->last_exit_status;
if (argc > 2)
return (ft_reti_print(1, "exit: too many arguments\n", 2));
if (argc == 2)