zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: TRAPZERR() in chpwd()
Date: Tue, 2 May 2000 14:28:12 +0200 (MET DST)	[thread overview]
Message-ID: <200005021228.OAA03106@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Tue, 02 May 2000 13:01:53 +0100


Peter Stephenson wrote:

> Sven wrote
> > It made things like `false && echo a; echo b' fail. The `echo b'
> > wasn't executed.
> >
> > The simplest way to solve this is by saving and
> > restoring donetrap around the execution of the pipelines.
> > 
> > 
> > I haven't committed the patch... does anyone see a problem with it?
> 
> Yes, the `donetrap' test which makes sure that the trap is only executed
> once for each occurrence of a non-zero return status isn't working.  (I
> think this is pretty much the only reason for having donetrap as a static
> variable, so saving it and restoring it essentially disables its staticness
> altogether, although there may well be some subtlety I'm missing.)

At least the things I triend my patch with work.

> % trap 'print ERRR-or!' ZERR
> % f() { false; }
> % f
> ERRR-or!
> ERRR-or!
> 
> How about a less drastic version of my previous patch?  I think the point
> is that we just need the `donetrap' effect but not the goto effect

Yep.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-05-02 12:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-02 12:28 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-05-02 11:15 Sven Wischnowsky
2000-05-02 12:01 ` Peter Stephenson
     [not found] <20000428161546.A8208@tdc134.comm.mot.com>
     [not found] ` <1000429044220.ZM30544@candle.brasslantern.com>
     [not found]   ` <20000501131328.A11940@tdc134.comm.mot.com>
     [not found]     ` <1000501182216.ZM13391@candle.brasslantern.com>
2000-05-01 21:37       ` Paul Ackersviller
2000-05-02  9:19         ` Peter Stephenson

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=200005021228.OAA03106@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).