zsh-workers
 help / color / mirror / code / Atom feed
From: "Sean C. Farley" <scf@FreeBSD.org>
To: zsh-workers@sunsite.dk
Subject: putenv()/environ bug
Date: Wed, 25 Jul 2007 10:09:22 -0500 (CDT)	[thread overview]
Message-ID: <20070725093254.T20275@thor.farley.org> (raw)

As noticed here[1] following a change[2] in FreeBSD's *env() functions,
zsh is mixing *env() (putenv() in this case) functions with direct
access to the environ variable's contents against the IEEE Std 1003.1
specification.  For the FreeBSD port, there is an easy solution in the
thread to tell configure that putenv() does not exist.  I just wanted to
let the zsh development team know about this issue.

Regarding FreeBSD, if you replace the environ pointer, a call to
setenv(), putenv() or unsetenv() will detect this and update itself
internally.  getenv() will use environ until one of the other *env()
functions is called.  If you manipulate environ values after a call to
setenv(), putenv() or unsetenv() is made, then the change will go
unnoticed.

BTW, is there a particular reason the standard *env() functions cannot
be used for all operations to environ if found?

Sean
   1. http://lists.freebsd.org/pipermail/freebsd-current/2007-July/075541.html
   2. http://lists.freebsd.org/pipermail/freebsd-ports/2007-May/041577.html
-- 
scf@FreeBSD.org


             reply	other threads:[~2007-07-25 17:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 15:09 Sean C. Farley [this message]
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

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=20070725093254.T20275@thor.farley.org \
    --to=scf@freebsd.org \
    --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).