summaryrefslogtreecommitdiffstats
path: root/src/e_builtins.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/e_builtins.c6
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);
}