Zsh Mailing List Archive
Messages sorted by:
Re: putenv()/environ bug
- X-seq: zsh-workers 23727
- From: "Sean C. Farley" <scf@xxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: putenv()/environ bug
- Date: Mon, 30 Jul 2007 17:39:47 -0500 (CDT)
- Cc: "Sean C. Farley" <scf@xxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- In-reply-to: <20070730213934.aefff281.p.w.stephenson@xxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20070725093254.T20275@xxxxxxxxxxxxxxx> <20070725215321.00e3b110.p.w.stephenson@xxxxxxxxxxxx> <20070725184302.S23862@xxxxxxxxxxxxxxx> <200707282246.16663.arvidjaar@xxxxxxxxxx> <20070729140248.D2588@xxxxxxxxxxxxxxx> <20070730213934.aefff281.p.w.stephenson@xxxxxxxxxxxx>
On Mon, 30 Jul 2007, Peter Stephenson wrote:
On Sun, 29 Jul 2007 14:08:42 -0500 (CDT)
"Sean C. Farley" <scf@xxxxxxxxxxx> wrote:
On Sat, 28 Jul 2007, Andrey Borzenkov wrote:
What about - check if (un-)setenv is available and use them. On
legacy systems use existing implementation. This probably will mean
we will be using native utilities everywhere on modern systems.
That would work for me. If anyone would like me to test any patches,
This sounds the best, and it's working on Fedora 7.
I've tested if both setenv() and unsetenv() are available and if they
are we don't do any management of the environment ourselves, so the
hack in addenv() doesn't occur... I hope that works, otherwise the
implementation of the library is fairly well broken, the whole point
of setenv/unsetenv being to be able to do this in a standard fashion.
The only references to environ we make with this code are to read it
at the start to initialise internval variables and to pass it to
execs. This seems to be sanctioned by POSIX.
As a TODO indicates, this means we don't actually need to store an
"env" string in the parameter structure, just a flag saying we've
stuck the value in the environment. That can change when this stuff
is clearly working.
This change fixes the issue concerning the *env() functions in FreeBSD
7-CURRENT. It works also with 6-STABLE. Thank you.
P.S. I am not subscribed; please keep me in the Cc.
Messages sorted by: