diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-10-26 14:31:44 +0100 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-10-26 14:31:44 +0100 |
commit | a39a1b47d5775404cd0357d105e132c3c69fa545 (patch) | |
tree | 03affc50a5c259b8e089d831ca2d300165d0016b /src/u_path.c | |
parent | merge wif master (diff) | |
download | 42-minishell-caps.tar.gz 42-minishell-caps.tar.bz2 42-minishell-caps.tar.xz 42-minishell-caps.tar.zst 42-minishell-caps.zip |
ARG_MAX DE MES DEUX BOULEScaps
Diffstat (limited to 'src/u_path.c')
-rw-r--r-- | src/u_path.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/u_path.c b/src/u_path.c index b43946f..a682a75 100644 --- a/src/u_path.c +++ b/src/u_path.c @@ -13,7 +13,9 @@ #include <libft.h> #include <stddef.h> #include <dirent.h> -#include <limits.h> +#include <linux/limits.h> + +/* TODO: ARG_MAX ????? */ #include "s_struct.h" #include "u_vars.h" @@ -42,11 +44,11 @@ uint8_t u_search_in_path(char fullpath[], t_msh *msh) { struct dirent *ent; - char tmp[ARG_MAX]; + char tmp[131072]; char *tok_path; DIR *dir; - if (u_get_var_value(tmp, "$PATH", ARG_MAX, msh) != 0) + if (u_get_var_value(tmp, "$PATH", 131072, msh) != 0) return (1); tok_path = ft_strtok(tmp, ":"); while (tok_path != NULL) |