diff options
Diffstat (limited to 'src/s_init.c')
-rw-r--r-- | src/s_init.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/s_init.c b/src/s_init.c index 7d2b656..c71ac9a 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -155,19 +155,18 @@ static void } } -t_msh - *init_msh(char *const argv[], char *const envp[]) +t_msh *init_msh(int32_t argc, char *const argv[], char *const envp[]) { char cwd[PATH_MAX]; t_msh *msh; if ((msh = (t_msh*)malloc(sizeof(t_msh))) == NULL) return (NULL); - if ((msh->shname = ft_strdup(argv[0])) == NULL) - return (NULL); msh->envp = NULL; if ((msh->envp = dupenv(envp)) == NULL) return (NULL); + msh->argc = argc - 1; + msh->argv = (char**)argv; msh->ret = 0; init_buptr(msh); msh->fd = 0; |