summaryrefslogtreecommitdiffstats
path: root/src/e_externs.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/e_externs.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/e_externs.c b/src/e_externs.c
index 7593c3d..0e3c2bb 100644
--- a/src/e_externs.c
+++ b/src/e_externs.c
@@ -16,6 +16,7 @@
#include <stdint.h>
#include <unistd.h>
+#include "b_export_next.h"
#include "e_externs_next.h"
#include "f_fail.h"
#include "m_redirs.h"
@@ -34,6 +35,20 @@ static void
}
static void
+ e_export_env_fork(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
exec_path(const char fullpath[],
t_lcom *ptr,
t_msh *msh)
@@ -43,8 +58,8 @@ static void
if ((pid = fork()) == 0)
{
- /* if (ptr->env_fork != NULL) */
- /* e_export_env_fork(ptr->env_fork, msh); */
+ if (ptr->env_fork != NULL)
+ e_export_env_fork(ptr, msh);
e_extern_child(fullpath, ptr, msh);
}
else if (pid < 0)