diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-18 18:11:04 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-18 18:11:04 +0200 |
commit | 6baf8c11080bc73f4a55b770c2adde9536bc513c (patch) | |
tree | cd798337112f78c414a7d370511a8bc78ffc9e5b /src/u_utils.c | |
parent | Handled execve fail (diff) | |
download | 42-minishell-6baf8c11080bc73f4a55b770c2adde9536bc513c.tar.gz 42-minishell-6baf8c11080bc73f4a55b770c2adde9536bc513c.tar.bz2 42-minishell-6baf8c11080bc73f4a55b770c2adde9536bc513c.tar.xz 42-minishell-6baf8c11080bc73f4a55b770c2adde9536bc513c.tar.zst 42-minishell-6baf8c11080bc73f4a55b770c2adde9536bc513c.zip |
HUGE pain in the ass finally over
Diffstat (limited to 'src/u_utils.c')
-rw-r--r-- | src/u_utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/u_utils.c b/src/u_utils.c index 5e31060..f50d861 100644 --- a/src/u_utils.c +++ b/src/u_utils.c @@ -13,10 +13,21 @@ #include <libft.h> #include <stdlib.h> #include <stdint.h> +#include <unistd.h> #include "f_fail.h" #include "s_struct.h" +void +u_eof_stdin(void) +{ + char *line; + + close(STDIN_FILENO); + get_next_line(STDIN_FILENO, &line); + ft_memdel((void*)&line); +} + char **u_get_env_var_names(t_msh *msh) { |