add: env_to_strs support for execve

This commit is contained in:
Camille Chauvet 2023-02-17 13:27:40 +01:00
parent d4cead2b0f
commit 6090784c02
2 changed files with 5 additions and 5 deletions

View File

@ -70,10 +70,9 @@ static int ft_excutor(t_cmd *cmd, t_list **env)
return (1); return (1);
if (pid == 0) if (pid == 0)
{ {
//TODO DO THIS tab = env_to_strs(env);
/* tab = t_env2tab(env); */ if (tab == NULL)
/* if (tab == NULL) */ return (1);
/* return (1); */
tab = NULL; tab = NULL;
dup2(cmd->fd_out, 1); dup2(cmd->fd_out, 1);
dup2(cmd->fd_in, 0); dup2(cmd->fd_in, 0);

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/14 13:45:30 by cchauvet #+# #+# */ /* Created: 2023/02/14 13:45:30 by cchauvet #+# #+# */
/* Updated: 2023/02/17 13:06:21 by cchauvet ### ########.fr */ /* Updated: 2023/02/17 13:26:53 by cchauvet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -42,6 +42,7 @@ t_list **ft_parse_cmds(char *line, t_list **env, int infile, int outfile);
int ft_cmd_filler(t_list *current, char **args, t_list **env); int ft_cmd_filler(t_list *current, char **args, t_list **env);
char *ft_normalizer(char *str); char *ft_normalizer(char *str);
char *ft_env_filler(t_list **env, const char *str); char *ft_env_filler(t_list **env, const char *str);
char **env_to_strs(t_list **head);
typedef struct s_cmd typedef struct s_cmd
{ {