diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-16 21:27:23 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-16 21:27:23 +0200 |
commit | ca1713c01ba190e8b56b0e8e5e56e9d5640be4be (patch) | |
tree | 545997b85d13948b33ecdb95057cd8a1b4d19073 /src/e_builtins.c | |
parent | h builtin in progress (diff) | |
download | 42-minishell-ca1713c01ba190e8b56b0e8e5e56e9d5640be4be.tar.gz 42-minishell-ca1713c01ba190e8b56b0e8e5e56e9d5640be4be.tar.bz2 42-minishell-ca1713c01ba190e8b56b0e8e5e56e9d5640be4be.tar.xz 42-minishell-ca1713c01ba190e8b56b0e8e5e56e9d5640be4be.tar.zst 42-minishell-ca1713c01ba190e8b56b0e8e5e56e9d5640be4be.zip |
h still in progress
Diffstat (limited to 'src/e_builtins.c')
-rw-r--r-- | src/e_builtins.c | 6 |
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); |