diff options
Diffstat (limited to '')
| -rw-r--r-- | TODO.org | 2 | ||||
| -rw-r--r-- | src/e_builtins.c | 17 | 
2 files changed, 18 insertions, 1 deletions
| @@ -1,6 +1,6 @@  * Stuff to fix  ** DONE PWD=qwe; pwd <== recheck -** TODO VISUAL=qweqwe crontab -e <=== deal with it +** DONE VISUAL=qweqwe crontab -e <=== deal with it  ** DONE cd qweqwe <=== stderr  ** TODO Handle memory 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); | 
