envp dup array

+ c->last_exit_status
This commit is contained in:
LuckyLaszlo
2021-10-24 10:23:20 +02:00
parent 39de10e001
commit 906074d2cb
7 changed files with 67 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 09:22:12 by lperrey #+# #+# */
/* Updated: 2021/10/19 11:58:13 by lperrey ### ########.fr */
/* Updated: 2021/10/23 16:04:03 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -18,7 +18,9 @@ static char *init_prompt(char *prompt_base);
int init(t_all *c, char *envp[])
{
ft_bzero(c, sizeof *c);
c->envp = envp;
c->envp = ft_dup_2d_arr(envp);
if (!c->envp)
return (ft_reti_perror(0, "ft_dup_2d_arr(envp) error"));
c->prompt_base = init_prompt_base();
if (!c->prompt_base)
return (ft_reti_perror(0, "init_prompt_base() error"));