From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23079 invoked by alias); 12 Sep 2011 16:04:18 -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: 29768 Received: (qmail 17696 invoked from network); 12 Sep 2011 16:04:16 -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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110912090353.ZM13021@torch.brasslantern.com> Date: Mon, 12 Sep 2011 09:03:53 -0700 In-reply-to: <20110912135123.GA12110@altlinux.org> Comments: In reply to "Alexey I. Froloff" "Re: How to misplace an entire pipeline" (Sep 12, 5:51pm) References: <110805203111.ZM32508@torch.brasslantern.com> <20110807185002.6a042cab@pws-pc.ntlworld.com> <110807144359.ZM27903@torch.brasslantern.com> <110807210507.ZM28821@torch.brasslantern.com> <20110808192720.380a3ee7@pws-pc.ntlworld.com> <110808231032.ZM2380@torch.brasslantern.com> <20110809211910.631d6561@pws-pc.ntlworld.com> <110813115208.ZM20513@torch.brasslantern.com> <20110912135123.GA12110@altlinux.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: How to misplace an entire pipeline MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Sep 12, 5:51pm, Alexey I. Froloff wrote: } } Sometimes, zsh segfaults here while doing B03print.ztst in POSIX } locale with thisjob equals to -1. Not 100% reproducable, though. This is why I wondered in the original patch message: : At this point list_pipe is true but the job receiving the stop signal : is not in the process list of the current job (thisjob), so it's : necessary to check whether the current job is a builtin. Unless you : can think of a case where thisjob would not correctly identify the : foreground job at the time the signal is handled? If I understand correctly, thisjob == -1 means there is no foreground job. I'm scratching my head over how list_pipe can be true when there is no job in the foreground. Could you please run ZTST_verbose=2 make TESTNUM=B03 check to verify which test is causing the segmentation fault? I suspect it's the very last test with "print -lO ... | while read ..." but I'd like to be sure. (OTOH it may not be possible to reproduce the fault with verbose output, but it's worth a try.) I further suspect the signal is arriving during foo=$line[i] or some other part of the inner loop where no actual command is being run, but list_pipe remains true because of the outer loop.