Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 4.3.11 TRAPEXIT() on cygwin
- X-seq: zsh-workers 28623
- From: "Anthony Heading" <anthony@xxxxxxxx>
- To: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- Subject: Re: 4.3.11 TRAPEXIT() on cygwin
- Date: Mon, 10 Jan 2011 21:54:29 -0500
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:from:to:cc:mime-version:content-transfer-encoding:content-type:in-reply-to:references:subject:date; s=smtpout; bh=dyznWXrY2S3pkrqd4KmVQLBs+NY=; b=rIQkQ0YTh0ctibgcEeOrbEFHxipTmiufMTJGwhDGI6Smp+1VUDIli9wz6tJR3brWcc7RZCdvZ76xnC9geIEcx3gsmV4LlzCqwqaLBf7osDKWPszwdLWY7oiy/OWTpBrro/J/lK3+AOJtT+qhaza0ZaIQM1DTyvAFyMaVoYNfdw8=
- In-reply-to: <AANLkTimgbQmZfHDUGmxOvA6+wED-WcL=Ke_Nag0h57wu@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1294704977.26846.1414490063@webmail.messagingengine.com><AANLkTikQfZrm9hra-q3y_VRgxP5JdmtuW5cGiORrNNAa@mail.gmail.com><1294710389.18824.1414500371@webmail.messagingengine.com> <AANLkTimgbQmZfHDUGmxOvA6+wED-WcL=Ke_Nag0h57wu@mail.gmail.com>
On Tue, 11 Jan 2011 02:50 +0100, "Mikael Magnusson" <mikachu@xxxxxxxxx>
wrote:
> > echo $( trap 'echo exiting' EXIT)
> >
> > or similar substitutions. That's quite clearly a subshell entering to
> > the same extent a ( ... ) is.
>
> How is that different from what you wrote?
Well, the examples you quote are traps set within a subshell, which may
or may not propagate higher.
My problem is that the subshell is inheriting the parent trap action.
That seems obviously different, and POSIX seems pretty clear:
When a subshell is entered, traps that are not being ignored shall
be set to the default actions, except in the case of a command
substitution containing only a single trap command, when the traps
need not be altered.
Anthony
Messages sorted by:
Reverse Date,
Date,
Thread,
Author