From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25465 invoked from network); 1 Jan 2004 23:39:27 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 1 Jan 2004 23:39:27 -0000 Received: (qmail 810 invoked by alias); 1 Jan 2004 23:39:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6969 Received: (qmail 555 invoked from network); 1 Jan 2004 23:39:00 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 1 Jan 2004 23:39:00 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [216.228.9.89] by sunsite.dk (MessageWall 1.0.8) with SMTP; 1 Jan 2004 23:38:59 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id E47F07C90; Thu, 1 Jan 2004 15:38:56 -0800 (PST) Date: Thu, 1 Jan 2004 15:38:56 -0800 From: Wayne Davison To: Vincent Stemen Cc: zsh-users@sunsite.dk Subject: Re: Possible bug in zsh Message-ID: <20040101233856.GA13263@blorf.net> References: <20031229080222.GA75453@quark.localdomain> <20031229092122.GA23732@binome.blorf.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031229092122.GA23732@binome.blorf.net> User-Agent: Mutt/1.5.4i On Mon, Dec 29, 2003 at 01:21:22AM -0800, Wayne Davison wrote: > false; if eval ''; then echo one; fi [...fails...] > true; if eval ''; then echo two; fi [...succeeds...] I'm hoping that someone more familiar with the exec internals will jump in here, but in the meantime, here's the change I made back on Monday to fix this bug: --- Src/builtin.c 13 Nov 2003 14:34:38 -0000 1.109 +++ Src/builtin.c 29 Dec 2003 09:50:52 -0000 @@ -4155,6 +4155,7 @@ errflag = 0; return 1; } + lastval = 0; execode(prog, 1, 0); if (errflag) { lastval = errflag; I'm not sure it's the best fix, though, as it might be better to change one of the lower functions down in the execode() calling chain instead of changing bin_eval(). It does fix the bug, though. ..wayne..