Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: Odd trap return status
- X-seq: zsh-workers 17257
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: PATCH: Re: Odd trap return status
- Date: Wed, 29 May 2002 11:00:40 -0700 (PDT)
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <15927.1022694626@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Sender: schaefer@xxxxxxxxxxxxxxxx
On Wed, 29 May 2002, Peter Stephenson wrote:
> I think you may be missing the point a bit, unless I am...
>
> trap 'return 1' DEBUG
>
> would already cause a return from the enclosing function, only the
> return status would get lost. I haven't changed the command flow
Right, but
foo () {
trap 'false' DEBUG
true
}
should not cause the exit status of foo to be nonzero. Really the worse
case is
foo() {
trap 'echo This command succeeds' DEBUG
false
}
which should not cause foo() to return a zero status. Installing a debug
trap shouldn't change the behavior of the debugged code unless it *also*
(intentionally) changes the command flow.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author