pipe sur redirection ne marche toujours pas

This commit is contained in:
hugogogo
2021-10-20 09:42:26 +02:00
parent f8c23f85b4
commit e08ceeaffe
3 changed files with 34 additions and 11 deletions

View File

@@ -32,6 +32,8 @@ int handle_fd(char **input, int i, int fdin, t_cmd *cmd)
cmd->fd_in = fdin;
cmd->fd_out = 1;
cmd->fd_redirect = 1;
cmd->pipe_in = 0;
cmd->pipe_out = 1;
next_in = 0;
if (input[i + 1])
{
@@ -39,6 +41,8 @@ int handle_fd(char **input, int i, int fdin, t_cmd *cmd)
pipe(pipes_fd);
cmd->fd_out = pipes_fd[1];
next_in = pipes_fd[0];
cmd->pipe_in = pipes_fd[0];
cmd->pipe_out = pipes_fd[1];
}
tmp = ft_strchr(input[i], '>');
if (tmp)