diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-23 20:21:33 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-23 20:21:33 +0200 |
commit | 59caf4e2750324f99d4294dfcc5b0e001f590ada (patch) | |
tree | 5c4be38e1e5ca86b937c69a95ab204645e31fc2f /src/ft_m_redirs.c | |
parent | Not bad tbh (diff) | |
download | 42-minishell-59caf4e2750324f99d4294dfcc5b0e001f590ada.tar.gz 42-minishell-59caf4e2750324f99d4294dfcc5b0e001f590ada.tar.bz2 42-minishell-59caf4e2750324f99d4294dfcc5b0e001f590ada.tar.xz 42-minishell-59caf4e2750324f99d4294dfcc5b0e001f590ada.tar.zst 42-minishell-59caf4e2750324f99d4294dfcc5b0e001f590ada.zip |
< redir works
Diffstat (limited to '')
-rw-r--r-- | src/ft_m_redirs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_m_redirs.c b/src/ft_m_redirs.c index 66c002a..91d8553 100644 --- a/src/ft_m_redirs.c +++ b/src/ft_m_redirs.c @@ -29,7 +29,8 @@ void { if ((fd = open(ptr->rdrpath, O_RDONLY)) == -1) ft_f_file(ptr->rdrpath, msh); - /* TODO: handle < redir */ + dup2(fd, STDIN_FILENO); + close(fd); } if (ptr->redir == 1) { |