diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/e_builtins.c | 17 |
1 files changed, 17 insertions, 0 deletions
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,6 +16,7 @@ #include <stdint.h> #include <unistd.h> +#include "b_export_next.h" #include "b_export_mute.h" #include "m_redirs.h" #include "s_destroy.h" @@ -23,12 +24,28 @@ #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, t_msh *msh) { 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); |