From owner-freebsd-current@FreeBSD.ORG Wed Jul 25 15:27:43 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 CF97716A418 for ; Wed, 25 Jul 2007 15:27:43 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 8AAB713C469 for ; Wed, 25 Jul 2007 15:27:43 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l6PFRbfS030304; Wed, 25 Jul 2007 10:27:37 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Wed, 25 Jul 2007 10:27:37 -0500 (CDT) From: "Sean C. Farley" To: Andrey Chernov In-Reply-To: <20070725084755.GA75871@nagual.pp.ru> Message-ID: <20070725102203.D20275@thor.farley.org> References: <200707251733.12658.doconnor@gsoft.com.au> <20070725084755.GA75871@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on mail.farley.org Cc: freebsd-current@FreeBSD.org, sergei@FreeBSD.org 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 15:27:43 -0000 On Wed, 25 Jul 2007, 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. I reported the bug to the zsh development list. As of v4.3.4 of zsh, the issue is still there. Sean -- scf@FreeBSD.org