From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20697 invoked by alias); 28 Sep 2014 18:18:56 -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: 33265 Received: (qmail 28820 invoked from network); 28 Sep 2014 18:18:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [80.3.229.105] X-Spam: 0 X-Authority: v=2.1 cv=dY0O3Bne c=1 sm=1 tr=0 a=uz1KDxDNIq33yePw376BBA==:117 a=uz1KDxDNIq33yePw376BBA==:17 a=NLZqzBF-AAAA:8 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=Ixq-GJvtkhjPOnbPx2UA:9 a=CjuIK1q_8ugA:10 a=I6wTmPyJxzYA:10 Date: Sun, 28 Sep 2014 19:18:50 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: SIGPIPE (Re: ZSH history not saved anymore) Message-ID: <20140928191850.61c28815@pws-pc.ntlworld.com> In-Reply-To: <140928110438.ZM27132@torch.brasslantern.com> References: <87mw9qdp7s.fsf@thinkpad-t440p.tsdh.org> <20140924200710.2f764272@pws-pc.ntlworld.com> <8738bg2n1v.fsf@thinkpad-t440p.tsdh.org> <140926000448.ZM30835@torch.brasslantern.com> <878ul6lrw9.fsf@thinkpad-t440p.tsdh.org> <87y4t66td0.fsf@thinkpad-t440p.tsdh.org> <871tqxqyil.fsf@thinkpad-t440p.tsdh.org> <140927105301.ZM31550@torch.brasslantern.com> <20140927214035.7af22023@pws-pc.ntlworld.com> <140927165554.ZM32155@torch.brasslantern.com> <140928110438.ZM27132@torch.brasslantern.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 28 Sep 2014 11:04:38 -0700 Bart Schaefer wrote: > Behavior before patch: > > torch% (sleep 5; echo hello; print -u2 continued after PIPE) | (exit) > torch% > > Behavior after patch in 33257: > > torch% (sleep 5; echo hello; print -u2 continued after PIPE) | (exit) > echo: write error: broken pipe > zsh: write error: broken pipe > continued after PIPE > torch% > > No history saved in either case, so at least that part is OK, but the > patch obviously breaks something in subshells. So in the first case I presume we're exiting (silently) on SIGPIPE. That should be just a question of checking if SIGPIPE is trapped and if it isn't setting the handler to the default in entersubsh(). There's some partial prior art for this. pws