summaryrefslogtreecommitdiffstats
path: root/src/m_argv.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-12-18 16:04:14 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-12-18 16:04:14 +0100
commit7629736298b29ad5be833c11d338ab3abe236917 (patch)
tree8c4161357ae75109bcc7b8bf38bcd8b985ea3774 /src/m_argv.c
parentMerge (diff)
parentPush (diff)
download42-minishell-7629736298b29ad5be833c11d338ab3abe236917.tar.gz
42-minishell-7629736298b29ad5be833c11d338ab3abe236917.tar.bz2
42-minishell-7629736298b29ad5be833c11d338ab3abe236917.tar.xz
42-minishell-7629736298b29ad5be833c11d338ab3abe236917.tar.zst
42-minishell-7629736298b29ad5be833c11d338ab3abe236917.zip
Merged branch 'gnu-compat'
Diffstat (limited to 'src/m_argv.c')
-rw-r--r--src/m_argv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/m_argv.c b/src/m_argv.c
index 525439b..859fa72 100644
--- a/src/m_argv.c
+++ b/src/m_argv.c
@@ -16,6 +16,8 @@
#include <fcntl.h>
#include <unistd.h>
+#include "c_init.h"
+#include "c_utils_next.h"
#include "f_fail.h"
#include "d_define.h"
#include "m_comm.h"
@@ -69,6 +71,8 @@ unsigned char m_argv(int argc, char *const argv[], t_msh *msh)
msh->prev_hist = m_get_prev_hist(msh);
msh->ret = m_source_mshrc(msh);
msh->fd = STDIN_FILENO;
+ c_get_msh(1, msh);
+ c_set_ptr(TRUE, 0, msh);
msh->ret = m_loop(STDIN_FILENO, msh);
}
else if (argc > 1 && ft_strncmp(*(argv + 1), M_OPT_COMMAND, 3) == 0)