zsh-users
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Vincent Stemen <zsh@hightek.org>
Cc: zsh-users@sunsite.dk
Subject: Re: Possible bug in zsh
Date: Thu, 1 Jan 2004 15:38:56 -0800	[thread overview]
Message-ID: <20040101233856.GA13263@blorf.net> (raw)
In-Reply-To: <20031229092122.GA23732@binome.blorf.net>

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..


  reply	other threads:[~2004-01-01 23:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-29  8:02 Vincent Stemen
2003-12-29  9:21 ` Wayne Davison
2004-01-01 23:38   ` Wayne Davison [this message]
2004-01-02  1:32     ` James Devenish
2004-01-03 23:09     ` Vincent Stemen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040101233856.GA13263@blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=zsh-users@sunsite.dk \
    --cc=zsh@hightek.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).