zsh oddities with recent -current
Andrey Chernov
ache at nagual.pp.ru
Wed Jul 25 09:02:06 UTC 2007
On Wed, Jul 25, 2007 at 12:47:56PM +0400, Andrey Chernov wrote:
> On Wed, Jul 25, 2007 at 05:33:05PM +0930, Daniel O'Connor wrote:
> > I updated my -current box (laptop) on the 18th and I have 2 strange
> > issues with zsh.
> >
> > 1) I can't unset environmental variables set before the shell started,
> > eg..
>
> zsh uses system's putenv() but home-rolled delete from environment
> (instead of unsetenv()). It clearly violates POSIX since it forbids to mix
> putenv/setenv/unsetenv with direct environ manipulations:
>
> "Conforming applications are required not to modify environ directly, but
> to use only the functions described here to manipulate the process
> environment as an abstract object. Thus, the implementation of the
> environment access functions has complete control over the data structure
> used to represent the environment (subject to the requirement that environ
> be maintained as a list of strings with embedded equal signs for
> applications that wish to scan the environment). This constraint allows
> the implementation to properly manage the memory it allocates, either by
> using allocated storage for all variables (copying them on the first
> invocation of setenv() or unsetenv()), or keeping track of which strings
> are currently in allocated space and which are not, via a separate table
> or some other means."
>
> Quick fix will be just to disable HAVE_PUTENV config option. It gains
> nothing in the code but makes troubles.
The patch is here:
--- configure.bak 2006-02-28 17:44:59.000000000 +0300
+++ configure 2007-07-25 12:59:34.000000000 +0400
@@ -10218,7 +10218,7 @@
setlocale \
uname \
signgam \
- putenv getenv \
+ getenv \
brk sbrk \
pathconf sysconf \
tgetent tigetflag tigetnum tigetstr setupterm \
--
http://ache.pp.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070725/d0758c54/attachment.pgp
More information about the freebsd-current
mailing list