diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/params.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 2a9133ef3..7b1a71a7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-04-13 Peter Stephenson <pws@cambridgesiliconradio.com> + * 10743: Src/params.c: replenv() failed importing special params + at start up because it was using the wrong environment block. + * 10738: Doc/Zsh/builtins.yo, Doc/Zsh/params.yo, Src/builtin.c, Src/params.c: local parameters can be exported; typeset +g -x and local -x work in a natural way; currently typeset -g still diff --git a/Src/params.c b/Src/params.c index 6a9dfe588..74c4ee1c8 100644 --- a/Src/params.c +++ b/Src/params.c @@ -454,6 +454,7 @@ createparamtable(void) { Param ip, pm; char **new_environ, **envp, **envp2, **sigptr, **t; + char **old_environ = environ; char buf[50], *str, *iname; int num_env, oae = opts[ALLEXPORT]; #ifdef HAVE_UNAME @@ -516,9 +517,12 @@ createparamtable(void) pm->flags |= PM_EXPORTED; pm->env = *envp++ = ztrdup(*envp2); *envp = NULL; - if (pm->flags & PM_SPECIAL) + if (pm->flags & PM_SPECIAL) { + environ = new_environ; pm->env = replenv(pm->env, getsparam(pm->nam), pm->flags); + environ = old_environ; + } } } *str = '='; |