Browse Source

[mod] add 'e' struct on right_redirection function

Moul 2 years ago
parent
commit
355c203b92
3 changed files with 3 additions and 3 deletions
  1. 1 1
      src/pipe_exec.c
  2. 1 1
      src/redirect.c
  3. 1 1
      src/sh.h

+ 1 - 1
src/pipe_exec.c

@@ -79,7 +79,7 @@ void	handle_multi_piping(t_e *e, t_pipe *p, t_pipe_redir *t)
 void	inside_pipe(t_e *e, t_pipe *p, t_pipe_redir *t)
 {
 	if (ft_strstr(t->operator, ">") != NULL)
-		right_redirections(p, t);
+		right_redirections(e, p, t);
 	if (t->itxt != NULL)
 		manage_cmd_2(e, p->cmd_opt[p->i]);
 	if (ft_strstr(t->operator, ">") != NULL)

+ 1 - 1
src/redirect.c

@@ -46,7 +46,7 @@ void	close_redirections(t_e *e, t_pipe *p, t_pipe_redir *t)
 ** save stdfd, dup new fd in STDIN
 */
 
-void	right_redirections(t_pipe *p, t_pipe_redir *t)
+void	right_redirections(t_e *e, t_pipe *p, t_pipe_redir *t)
 {
 	int		fd_file;
 

+ 1 - 1
src/sh.h

@@ -60,7 +60,7 @@ void	remove_cotes(char **cmd);
 */
 void	open_redirections(t_e *e, t_pipe *p, t_pipe_redir *t);
 void	close_redirections(t_e *e, t_pipe *p, t_pipe_redir *t);
-void	right_redirections(t_pipe *p, t_pipe_redir *t);
+void	right_redirections(t_e *e, t_pipe *p, t_pipe_redir *t);
 /*
 ** heredoc.c
 */