diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-04-29 11:47:02 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-04-29 11:47:02 +0200 |
commit | 961bda4f42562bf8ceb70a888730362d021c5552 (patch) | |
tree | 820577dc790c3a8884c44b329d04a8d42ed1ca44 /src/ft_b_exit.c | |
parent | simple really (diff) | |
parent | Trying vars (diff) | |
download | 42-minishell-961bda4f42562bf8ceb70a888730362d021c5552.tar.gz 42-minishell-961bda4f42562bf8ceb70a888730362d021c5552.tar.bz2 42-minishell-961bda4f42562bf8ceb70a888730362d021c5552.tar.xz 42-minishell-961bda4f42562bf8ceb70a888730362d021c5552.tar.zst 42-minishell-961bda4f42562bf8ceb70a888730362d021c5552.zip |
merge master into fmoenne_indahouse
Diffstat (limited to '')
-rw-r--r-- | src/ft_b_exit.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/ft_b_exit.c b/src/ft_b_exit.c index ae421cf..7a7e5e8 100644 --- a/src/ft_b_exit.c +++ b/src/ft_b_exit.c @@ -13,6 +13,8 @@ #include <libft.h> #include <stdlib.h> #include <stdint.h> +#include <unistd.h> + #include "ft_f_fail.h" #include "ft_s_lcom.h" #include "ft_s_destroy.h" @@ -36,13 +38,6 @@ uint8_t ret = ft_atoi(args[0]); /* TODO: non numeric args[0] */ } - else - { - ret = msh->ret; - } - ft_lcom_clear(&msh->curr); - ft_s_destroy(msh); - ft_printf("exit\n"); - exit(ret); + ft_dprintf(STDERR_FILENO, "exit\n"); return (0); } |