summaryrefslogtreecommitdiffstats
path: root/src/ft_s_init.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-23 20:31:21 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-23 20:31:21 +0200
commit9f073fc25c90974b408c75bf9a063538cb3cdefe (patch)
treeac01185f1a4068698f0309481c3786f65e261489 /src/ft_s_init.c
parent< redir works (diff)
download42-minishell-9f073fc25c90974b408c75bf9a063538cb3cdefe.tar.gz
42-minishell-9f073fc25c90974b408c75bf9a063538cb3cdefe.tar.bz2
42-minishell-9f073fc25c90974b408c75bf9a063538cb3cdefe.tar.xz
42-minishell-9f073fc25c90974b408c75bf9a063538cb3cdefe.tar.zst
42-minishell-9f073fc25c90974b408c75bf9a063538cb3cdefe.zip
pwd is bav
Diffstat (limited to 'src/ft_s_init.c')
-rw-r--r--src/ft_s_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ft_s_init.c b/src/ft_s_init.c
index 63856c2..6c20c10 100644
--- a/src/ft_s_init.c
+++ b/src/ft_s_init.c
@@ -11,6 +11,8 @@
/* ************************************************************************** */
#include <libft.h>
+#include <unistd.h>
+
#include "ft_d_define.h"
#include "ft_m_funptr.h"
#include "ft_s_init.h"
@@ -30,6 +32,8 @@ t_msh
return (NULL);
}
ft_strlcpy(msh->ps_one, FT_PS_ONE, ft_strlen(FT_PS_ONE) + 1);
+ msh->cwd = NULL;
+ msh->cwd = getcwd(NULL, 0);
msh->envp = envp;
msh->ret = 0;
ft_init_buptr(msh);