ca marche a peu pres, il faut gerer la fermeture des fd entre pipes et redirections

This commit is contained in:
hugogogo
2021-10-19 22:57:00 +02:00
parent 5279c031fa
commit 4d812cd346
7 changed files with 128 additions and 234 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 02:59:58 by lperrey #+# #+# */
/* Updated: 2021/10/16 15:20:32 by hulamy ### ########.fr */
/* Updated: 2021/10/19 21:59:24 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -30,5 +30,9 @@ char *ft_strjoinfree_s2(const char *s1, char *s2);
// pipes hugo
void pipes_hugo(char *input, t_all *c);
// parser hugo
void **cmd_path(char **argv, char **envp);
int handle_fd(char **input, int i, int fdin, int *fd_in, int *fd_out);
t_list *parser(char *input, char **envp);
#endif

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 02:35:52 by lperrey #+# #+# */
/* Updated: 2021/10/10 05:39:09 by lperrey ### ########.fr */
/* Updated: 2021/10/19 21:58:02 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,4 +20,13 @@ typedef struct s_all
char *prompt;
} t_all;
typedef struct s_cmd
{
char **argv;
pid_t pid;
void *builtin;
int fd_in;
int fd_out;
} t_cmd;
#endif