fixed argv open().

previously wrongly dup2() to STDIN.
This commit is contained in:
lperrey
2021-12-20 22:52:41 +01:00
parent 6a9b7bae1b
commit 8ed97346f7
11 changed files with 78 additions and 87 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 02:59:58 by lperrey #+# #+# */
/* Updated: 2021/12/20 18:06:36 by lperrey ### ########.fr */
/* Updated: 2021/12/20 21:51:07 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -18,13 +18,13 @@ extern char **environ;
// Init
int init(t_all *c, char *argv[]);
char *init_prompt(char *prompt_base);
char *update_prompt(char *prompt_base);
char **retrieve_path(void);
void set_signals_behaviour(void);
// Shell modes
void shell_loop(t_all *c);
void shell_script(t_all *c);
void shell_script(t_all *c, int script_fd);
// Lexer
t_token *lexing(char *input);

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 02:35:52 by lperrey #+# #+# */
/* Updated: 2021/12/20 17:24:45 by lperrey ### ########.fr */
/* Updated: 2021/12/20 22:13:45 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -42,6 +42,7 @@ typedef struct s_all
char *prompt_base;
char *prompt;
t_token *token_list;
int script_fd;
} t_all;
#endif