summaryrefslogtreecommitdiffstats
path: root/src/e_builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/e_builtins.c')
-rw-r--r--src/e_builtins.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/e_builtins.c b/src/e_builtins.c
index 90e436e..92af2c3 100644
--- a/src/e_builtins.c
+++ b/src/e_builtins.c
@@ -51,7 +51,11 @@ static void
if (ptr->env_fork != NULL)
e_export_env_fork(ptr, msh);
dup_redirs(ptr, msh);
- ret = msh->bu_ptr[bu_id](ptr->argv + 1, msh);
+ ret = 0;
+ if (bu_id == FT_ID_H && msh->fd == STDIN_FILENO)
+ ret = msh->bu_ptr[bu_id](ptr->argv + 1, msh);
+ else
+ ret = msh->bu_ptr[bu_id](ptr->argv + 1, msh);
u_eof_fd(msh->fd);
s_com_destroy(&msh->com);
s_line_clear(&msh->curr);