diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/e_redirs.c | 4 | ||||
-rw-r--r-- | src/p_redirs.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/e_redirs.c b/src/e_redirs.c index 1d66226..f559ca1 100644 --- a/src/e_redirs.c +++ b/src/e_redirs.c @@ -90,8 +90,8 @@ void e_dup_redirs(const t_com *com, t_msh *msh) e_redir_plus_one(ptr, msh); else if (ptr->redir == 2) e_redir_plus_two(ptr, msh); - /* else if (ptr->redir == 3) */ - /* e_redir_plus_three(ptr, msh); */ + else if (ptr->redir == 3) + dup2(ptr->right_fd, ptr->fd); ptr = ptr->next; } } diff --git a/src/p_redirs.c b/src/p_redirs.c index 0ecdee7..86aca27 100644 --- a/src/p_redirs.c +++ b/src/p_redirs.c @@ -147,7 +147,8 @@ int8_t p_redirs(char word[], t_com **com, t_msh *msh) mode = u_meet_dquote(word, ptr, mode); else if (*ptr == C_SQUOTE) mode = u_meet_squote(word, ptr, mode); - else if (mode == Q_NONE && (*ptr == '<' || *ptr == '>') == 1) + else if (mode == Q_NONE && (*ptr == '<' || *ptr == '>') == 1 + && u_is_not_escaped(word, ptr) == TRUE) { if (p_get_redir(word, ptr, *com, msh) != 0) return (1); |