From b3e9a23f322ebffd1f61d04cb7b530ca767a8c16 Mon Sep 17 00:00:00 2001 From: Etienne Rey-bethbeder Date: Wed, 5 Apr 2023 12:17:16 +0200 Subject: [PATCH] _ --- builtins/builtins.h | 4 ++-- builtins/exit.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builtins/builtins.h b/builtins/builtins.h index faf28bc..25ab11a 100644 --- a/builtins/builtins.h +++ b/builtins/builtins.h @@ -6,7 +6,7 @@ /* By: cchauvet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/02/24 10:17:59 by erey-bet #+# #+# */ -/* Updated: 2023/03/30 15:04:47 by erey-bet ### ########.fr */ +/* Updated: 2023/04/05 12:16:37 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,14 +24,14 @@ static int error(int err, char *reason, char *problem) return (err); } -int ft_exit(char **args) +int ft_exit(char **args, int err) { int err; if (args[0] == NULL) { write(1, "exit\n", 6); - return (0); + return (err); } err = ft_atoi_check(args[0]); if (err == 1)