From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21619 invoked by alias); 11 Jan 2011 02:54:34 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28623 Received: (qmail 29739 invoked from network); 11 Jan 2011 02:54:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.25 as permitted sender) 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= Message-Id: <1294714469.3446.1414534693@webmail.messagingengine.com> X-Sasl-Enc: zLRbUStkof8viOaP6PUUnhJHdehGGdxpXrX3O2AYYJhv 1294714469 From: "Anthony Heading" To: "Mikael Magnusson" Cc: zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: References: <1294704977.26846.1414490063@webmail.messagingengine.com><1294710389.18824.1414500371@webmail.messagingengine.com> Subject: Re: 4.3.11 TRAPEXIT() on cygwin Date: Mon, 10 Jan 2011 21:54:29 -0500 On Tue, 11 Jan 2011 02:50 +0100, "Mikael Magnusson" 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