zsh-workers
 help / color / mirror / code / Atom feed
From: "Sean C. Farley" <scf@FreeBSD.org>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: "Sean C. Farley" <scf@FreeBSD.org>, zsh-workers@sunsite.dk
Subject: Re: putenv()/environ bug
Date: Mon, 30 Jul 2007 17:39:47 -0500 (CDT)	[thread overview]
Message-ID: <20070730173612.C5687@thor.farley.org> (raw)
In-Reply-To: <20070730213934.aefff281.p.w.stephenson@ntlworld.com>

On Mon, 30 Jul 2007, Peter Stephenson wrote:

> On Sun, 29 Jul 2007 14:08:42 -0500 (CDT)
> "Sean C. Farley" <scf@FreeBSD.org> 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,
>> I will.
>
> 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.

Sean

P.S.  I am not subscribed; please keep me in the Cc.
-- 
scf@FreeBSD.org


      parent reply	other threads:[~2007-07-30 22:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 15:09 Sean C. Farley
2007-07-25 20:53 ` Peter Stephenson
2007-07-26  0:14   ` Sean C. Farley
2007-07-28 18:46     ` Andrey Borzenkov
2007-07-29 19:08       ` Sean C. Farley
2007-07-30 20:39         ` Peter Stephenson
2007-07-30 20:52           ` Peter Stephenson
2007-07-30 22:44             ` Sean C. Farley
2007-07-31  9:00               ` Peter Stephenson
2007-07-31 18:09                 ` Sean C. Farley
2007-07-30 22:39           ` Sean C. Farley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070730173612.C5687@thor.farley.org \
    --to=scf@freebsd.org \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).