WIP exec_cmd_line()

+ fix error handle in redirections()
+ rename ft_free_cmd_arr() to free_pipeline()
+ "char **path" added to "struct t_all"
+ misc
This commit is contained in:
LuckyLaszlo
2021-11-16 08:49:57 +01:00
parent bb77de0588
commit 140549db00
11 changed files with 239 additions and 51 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 02:35:52 by lperrey #+# #+# */
/* Updated: 2021/11/11 07:21:47 by lperrey ### ########.fr */
/* Updated: 2021/11/16 08:45:10 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -36,21 +36,23 @@ typedef struct s_token
enum e_token_id id;
} t_token;
typedef int (*t_builtin_ptr)(int,char **,struct s_all *);
typedef int (*t_builtin_f)(int,char **,struct s_all *);
typedef struct s_cmd
{
char **argv;
pid_t pid;
t_builtin_ptr *builtin_command;
int fd_in;
int fd_out;
char **argv;
char *path;
t_builtin_f builtin_func;
int fd_in;
int fd_out;
pid_t pid;
} t_cmd;
typedef struct s_all
{
t_cmd **cmd_arr;
char **envp;
char **path;
char *prompt_base;
char *prompt;
t_token *token_list;