From 59caf4e2750324f99d4294dfcc5b0e001f590ada Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 23 Apr 2020 20:21:33 +0200 Subject: < redir works --- src/ft_m_redirs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3