diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-22 17:06:27 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-22 17:06:27 +0200 |
commit | df79f8d8a7a83af3b83f660d99924cbf637608c6 (patch) | |
tree | 98336f8880cdcf4fb8fd85ed5a05f0d6650989b6 /src | |
parent | Updated helper (diff) | |
download | 42-minishell-df79f8d8a7a83af3b83f660d99924cbf637608c6.tar.gz 42-minishell-df79f8d8a7a83af3b83f660d99924cbf637608c6.tar.bz2 42-minishell-df79f8d8a7a83af3b83f660d99924cbf637608c6.tar.xz 42-minishell-df79f8d8a7a83af3b83f660d99924cbf637608c6.tar.zst 42-minishell-df79f8d8a7a83af3b83f660d99924cbf637608c6.zip |
In progress
Diffstat (limited to 'src')
-rw-r--r-- | src/p_redirs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/p_redirs.c b/src/p_redirs.c index a47812c..6297255 100644 --- a/src/p_redirs.c +++ b/src/p_redirs.c @@ -119,6 +119,7 @@ static void p_get_redir(char word[], char *ptr, t_com *com, t_msh *msh) fd_rdr[FD] = STDOUT_FILENO; fd_rdr[RDR] = (*ptr == '>') ? (1) : (-1); fd_rdr[RDR] = (fd_rdr[RDR] == 1 && *(ptr + 1) == '>') ? (2) : (fd_rdr[1]); + fd_rdr[RDR] = (fd_rdr[RDR] == 1 && *(ptr + 1) == '&') ? (3) : (fd_rdr[1]); fd_rdr[RDR] = (fd_rdr[RDR] == -1 && *(ptr + 1) == '<') ? (-2) : (fd_rdr[1]); fd_rdr[RDR] = (fd_rdr[RDR] == -2 && *(ptr + 2) == '-') ? (-3) : (fd_rdr[1]); pos[0] = (fd_rdr[FD] == STDOUT_FILENO) ? |