mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-26 01:41:14 +01:00
10743: fix replenv() of imported special parameters
This commit is contained in:
parent
cf92384eac
commit
6372332a92
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 = '=';
|
||||
|
|
Loading…
Reference in a new issue