Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
putenv()/environ bug
- X-seq: zsh-workers 23698
- From: "Sean C. Farley" <scf@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: putenv()/environ bug
- Date: Wed, 25 Jul 2007 10:09:22 -0500 (CDT)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author