Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
X-AuditID: cbfec7f4-f79026d00000418a-74-56dff2fca07b
Date: Wed, 09 Mar 2016 09:55:06 +0000
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Signal handling bugaboo in command substitution
Message-id: <20160309095506.305d64c8@pwslap01u.europe.root.pri>
In-reply-to:
 <CAH+w=7YCFciaFG8xMFqAefj2pK2ODkwWRM=2kiA+oGDQcxaB7Q@mail.gmail.com>
References: <160307184406.ZM23121@torch.brasslantern.com>
 <20160308100004.3011d110@pwslap01u.europe.root.pri>
 <20160308101221.625cef45@pwslap01u.europe.root.pri>
 <CAH+w=7YCFciaFG8xMFqAefj2pK2ODkwWRM=2kiA+oGDQcxaB7Q@mail.gmail.com>
Organization: Samsung Cambridge Solution Centre
X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu)
MIME-version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7bit
X-Brightmail-Tracker:
 H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsVy+t/xK7p/Pt0PMzi3RcniYPNDJgdGj1UH
	PzAFMEZx2aSk5mSWpRbp2yVwZXT+OshWsJit4tz2yawNjK2sXYycHBICJhLTd39ghLDFJC7c
	W8/WxcjFISSwlFFix7uPLBDODCaJozsWM0I4pxklli38wArhnGGUeLrlIDNIP4uAqsSnqf/Y
	QGw2AUOJqZtmg80VEdCS2HHyJBOILSxgI7Hh6hSgeg4OXgF7iYX3wco5BYIlbr/uZ4aY+YZR
	4vHUi2D38QvoS1z9+4kJ4j57iZlXzoDN5BUQlPgx+R4LiM0MNH/ztiZWCFteYvOat2D3CAmo
	S9y4u5t9AqPwLCQts5C0zELSsoCReRWjaGppckFxUnquoV5xYm5xaV66XnJ+7iZGSEB/2cG4
	+JjVIUYBDkYlHt4Il/thQqyJZcWVuYcYJTiYlUR4N70DCvGmJFZWpRblxxeV5qQWH2KU5mBR
	Euedu+t9iJBAemJJanZqakFqEUyWiYNTqoHRYObCD/YMtjMX6G+y7M/KufngFctdM+YFL1we
	+TXv0OaOSFlyLGRJg2pBp6mv3rrJDS13tJ72H7pzqevkY7alKuefW+9LFQ25pWcvwtegezQm
	07fcpbflnWdTYLp1xjmRT/b/4latPvJyn8buiFd12pNWv7zOlx7CJ2TwWMAz4Uzvut4dMZFK
	LMUZiYZazEXFiQBkeiDjZAIAAA==
X-Seq: zsh-workers 38117

On Tue, 08 Mar 2016 09:30:42 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Tue, Mar 8, 2016 at 2:12 AM, Peter Stephenson
> <p.stephenson@samsung.com> wrote:
> >
> > Actually, probably ESUB_NOMONITOR should take precedence.  That's really
> > not a good place to allow this stuff, no matter who thought it might be...
> 
> Aside from the spurious ChangeLog diff and the inconsistent
> left-curly-brace cuddling, this seems to do what was intended.

It occurs to me there's probably still a very thin race associated with
forking and then calling entersubsh() that may be wider than just this
case.  We'd need to queue signals before the fork and unqueue them in
both parent and child at the end of entersubsh().  It might well be more
trouble than it's worth to fix.

pws

