Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: 3.0.6 SEGV in unset PATH; export PATH
- X-seq: zsh-workers 8128
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Patrik Hagglund <patha@xxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: 3.0.6 SEGV in unset PATH; export PATH
- Date: Mon, 4 Oct 1999 14:59:22 +0000
- In-reply-to: <199910040906.LAA06116@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199910040906.LAA06116@xxxxxxxxxxxxxxxxxxx>
On Oct 4, 11:06am, Patrik Hagglund wrote:
} Subject: 3.0.6 SEGV in unset PATH; export PATH
}
} (gdb) bt
} #0 0x4c3e4 in mkenvstr ()
Patch below. However, the behavior is not the same as 3.1.6 in this case:
unset PATH ; export PATH=/bin:/usr/bin
In 3.0.6 this sets $path to (/bin /usr/bin) and $PATH to /bin:/usr/bin, but
in 3.1.6 it sets only $PATH. Is it intentional that the tied parameter got
uncoupled that way?
Index: Src/builtin.c
===================================================================
@@ -2861,7 +2861,7 @@
pm->ct = auxlen;
if (PM_TYPE(pm->flags) != PM_ARRAY) {
if (pm->flags & PM_EXPORTED) {
- if (!pm->env)
+ if (!(pm->flags & PM_UNSET) && !pm->env)
pm->env = addenv(pname, value ? value : getsparam(pname));
} else if (pm->env) {
delenv(pm->env);
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author