diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-06 17:51:13 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-06 17:51:13 +0200 |
commit | 7262c6bb1d1608614700945e87fd5cd9ca6eef32 (patch) | |
tree | e170485dc7c22a3facba30e61c80ea75d3dcbcc8 /src/e_builtins.c | |
parent | Removed useless bloat (diff) | |
download | 42-minishell-7262c6bb1d1608614700945e87fd5cd9ca6eef32.tar.gz 42-minishell-7262c6bb1d1608614700945e87fd5cd9ca6eef32.tar.bz2 42-minishell-7262c6bb1d1608614700945e87fd5cd9ca6eef32.tar.xz 42-minishell-7262c6bb1d1608614700945e87fd5cd9ca6eef32.tar.zst 42-minishell-7262c6bb1d1608614700945e87fd5cd9ca6eef32.zip |
In progress, trying to redirect correctly
Diffstat (limited to 'src/e_builtins.c')
-rw-r--r-- | src/e_builtins.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/e_builtins.c b/src/e_builtins.c index 98d54c7..d6ca4f4 100644 --- a/src/e_builtins.c +++ b/src/e_builtins.c @@ -23,12 +23,14 @@ void e_builtin(const t_lcom *ptr, - uint8_t bu_id, - t_msh *msh) + uint8_t bu_id, + t_msh *msh) { int32_t ret; dup_redirs(ptr, msh); ret = msh->bu_ptr[bu_id](ptr->argv + 1, msh); msh->ret = ret; + if (ptr->redir > 0) + close(ptr->rdrfd); } |