This commit is contained in:
Etienne Rey-bethbeder 2023-04-05 12:17:16 +02:00
parent b1805834ec
commit b3e9a23f32
2 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/27 13:41:30 by cchauvet #+# #+# */ /* Created: 2023/03/27 13:41:30 by cchauvet #+# #+# */
/* Updated: 2023/03/27 13:41:31 by cchauvet ### ########.fr */ /* Updated: 2023/04/05 12:16:50 by erey-bet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -21,6 +21,6 @@ int print_env(t_list **env, int fd);
int ft_export(t_list **env, char **args, int fd); int ft_export(t_list **env, char **args, int fd);
int move_folder(char **args, int fd); int move_folder(char **args, int fd);
int unset(t_list **env, char **args, int fd); int unset(t_list **env, char **args, int fd);
int ft_exit(char **args); int ft_exit(char **args, int err);
#endif #endif

View File

@ -6,7 +6,7 @@
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */ /* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/24 10:17:59 by erey-bet #+# #+# */ /* 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); return (err);
} }
int ft_exit(char **args) int ft_exit(char **args, int err)
{ {
int err; int err;
if (args[0] == NULL) if (args[0] == NULL)
{ {
write(1, "exit\n", 6); write(1, "exit\n", 6);
return (0); return (err);
} }
err = ft_atoi_check(args[0]); err = ft_atoi_check(args[0]);
if (err == 1) if (err == 1)