Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: exit status
- X-seq: zsh-workers 22994
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: exit status
- Date: Fri, 10 Nov 2006 07:58:08 -0800
- In-reply-to: <200611100940.kAA9ewZY012583@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200611100940.kAA9ewZY012583@xxxxxxxxxxxxxx>
On Nov 10, 9:40am, Peter Stephenson wrote:
}
} A thread on the Austin group suggests the exit status of the shell
} should be available in exit traps.
I'm leaning towards Don Cragun's camp (the prior-to-this-patch zsh
behavior) on this one. I think the answer (and a general issue about
the new hook functions, incidentally) is tied to the answer to this
other question:
What is the final exit status of the shell when the exit trap itself
calls exit?
If
trap 'exit 42' EXIT; exit 1
returns 42 to the calling environment, then Korn and the GNU guys are
correct. If it exits 1, then Don Cragun is correct.
Similarly, what happens if the zshexit hook calls exit? What happens
if the zshexit hook calls "return 37"?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author