From owner-freebsd-current@FreeBSD.ORG Wed Jul 25 09:02:06 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DEBB16A417; Wed, 25 Jul 2007 09:02:06 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 13C6513C46C; Wed, 25 Jul 2007 09:02:05 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.1/8.14.1) with ESMTP id l6P924mO087479; Wed, 25 Jul 2007 13:02:04 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nagual.pp.ru; s=default; t=1185354124; bh=4UnuQ/J+elURVj7/YiKMVFHqsghGk6M7wfj+aVU BWGg=; l=2369; h=Received:Date:From:To:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:User-Agent; b=lODTAukTPK2CTb2cm9vH BrBBNBsuZIpbvmruEHTks/txpJ0vi1mhesDNZoqTB4awgknkVzRbOUmegqU7/3JJ1Oz QwRUeyYLFfX9Z833KFqrQPMefHnVjuhS41E3a0QJCfgLBCWiIWNUA8fok0zrqwoQ7nS 4e2UBp6jNuqRAD11A= Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id l6P923uv087477; Wed, 25 Jul 2007 13:02:04 +0400 (MSD) (envelope-from ache) Date: Wed, 25 Jul 2007 13:02:03 +0400 From: Andrey Chernov To: "Daniel O'Connor" , sergei@FreeBSD.org, scf@FreeBSD.org, freebsd-current@FreeBSD.org Message-ID: <20070725090203.GA87414@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Daniel O'Connor , sergei@FreeBSD.org, scf@freebsd.org, freebsd-current@FreeBSD.ORG References: <200707251733.12658.doconnor@gsoft.com.au> <20070725084755.GA75871@nagual.pp.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <20070725084755.GA75871@nagual.pp.ru> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: Re: zsh oddities with recent -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2007 09:02:06 -0000 --/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--