From 83b436aeb610676cd2cd4533ed688319ec08f1d3 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 10 Aug 2020 19:10:13 +0200 Subject: Instant vars TODO done --- src/e_builtins.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/e_builtins.c b/src/e_builtins.c index bc348fd..7b074af 100644 --- a/src/e_builtins.c +++ b/src/e_builtins.c @@ -16,12 +16,27 @@ #include #include +#include "b_export_next.h" #include "b_export_mute.h" #include "m_redirs.h" #include "s_destroy.h" #include "s_lcom.h" #include "s_struct.h" +static void + e_export_env_fork(const t_lcom *ptr, + t_msh *msh) +{ + char **re_ptr; + + re_ptr = ptr->env_fork; + while (*re_ptr != NULL) + { + b_export_with_equals(*re_ptr, msh); + re_ptr++; + } +} + static void e_builtin_child(const t_lcom *ptr, uint8_t bu_id, @@ -29,6 +44,8 @@ static void { int32_t ret; + 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); lcom_clear(&msh->curr); -- cgit v1.2.3