diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-05-21 11:19:30 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-05-21 11:19:30 +0000 |
commit | 665b0950c66e34f687ec2e6f02021b57499daead (patch) | |
tree | bb959c397a49bcdb4df231373e06066e24d1dfe9 /Src/exec.c | |
parent | ac3bedf522be2b9f0b9e31da1deca4a6835bc04e (diff) | |
download | zsh-665b0950c66e34f687ec2e6f02021b57499daead.tar.gz zsh-665b0950c66e34f687ec2e6f02021b57499daead.tar.xz zsh-665b0950c66e34f687ec2e6f02021b57499daead.zip |
19971: Fix environment nastiness in zexecve()
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Src/exec.c b/Src/exec.c index 1bc461ffa..fe1415845 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -352,18 +352,13 @@ zexecve(char *pth, char **argv) for (eep = argv; *eep; eep++) if (*eep != pth) unmetafy(*eep, NULL); - for (eep = environ; *eep; eep++) - if (**eep == '_' && (*eep)[1] == '=') - break; buf[0] = '_'; buf[1] = '='; if (*pth == '/') strcpy(buf + 2, pth); else sprintf(buf + 2, "%s/%s", pwd, pth); - if (!*eep) - eep[1] = NULL; - *eep = buf; + zputenv(buf); closedumps(); execve(pth, argv, environ); |