Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2007 13:02:03 +0400
From:      Andrey Chernov <ache@nagual.pp.ru>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>, sergei@FreeBSD.org, scf@FreeBSD.org, freebsd-current@FreeBSD.org
Subject:   Re: zsh oddities with recent -current
Message-ID:  <20070725090203.GA87414@nagual.pp.ru>
In-Reply-To: <20070725084755.GA75871@nagual.pp.ru>
References:  <200707251733.12658.doconnor@gsoft.com.au> <20070725084755.GA75871@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
> > issues with zsh.
> >=20
> > 1) I can't unset environmental variables set before the shell started,=
=20
> > eg..
>=20
> zsh uses system's putenv() but home-rolled delete from environment=20
> (instead of unsetenv()). It clearly violates POSIX since it forbids to mi=
x=20
> putenv/setenv/unsetenv with direct environ manipulations:
>=20
> "Conforming applications are required not to modify environ directly, but=
=20
> to use only the functions described here to manipulate the process=20
> environment as an abstract object. Thus, the implementation of the=20
> environment access functions has complete control over the data structure=
=20
> used to represent the environment (subject to the requirement that enviro=
n=20
> be maintained as a list of strings with embedded equal signs for=20
> applications that wish to scan the environment). This constraint allows=
=20
> the implementation to properly manage the memory it allocates, either by=
=20
> using allocated storage for all variables (copying them on the first=20
> invocation of setenv() or unsetenv()), or keeping track of which strings=
=20
> are currently in allocated space and which are not, via a separate table=
=20
> or some other means."
>=20
> Quick fix will be just to disable HAVE_PUTENV config option. It gains=20
> 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 \

--=20
http://ache.pp.ru/

--/04w6evG8XlLl3ft
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFGpxGLVg5YK5ZEdN0RAv02AJ0cjgCH4QZ9/RrLB6nA/hg6dvQqpACgl1uY
8Ib7gkT3j5GdLt6rNpIuUKE=
=mHCl
-----END PGP SIGNATURE-----

--/04w6evG8XlLl3ft--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070725090203.GA87414>