From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4459 invoked by alias); 12 Sep 2011 13:51:31 -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: 29767 Received: (qmail 22277 invoked from network); 12 Sep 2011 13:51:29 -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 autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at altlinux.org does not designate permitted sender hosts) Date: Mon, 12 Sep 2011 17:51:23 +0400 From: "Alexey I. Froloff" To: zsh-workers@zsh.org Subject: Re: How to misplace an entire pipeline Message-ID: <20110912135123.GA12110@altlinux.org> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline In-Reply-To: <110813115208.ZM20513@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-12-30) --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 13, 2011 at 11:52:08AM -0700, Bart Schaefer wrote: > if (findproc(pid, &jn, &pn, 0)) { > + if (((jn->stat & STAT_BUILTIN) || > + (list_pipe && (jobtab[thisjob].stat & STAT_BUILTIN))) && > + WIFSTOPPED(status) && WSTOPSIG(status) =3D=3D SIGTSTP) { > + killjb(jn, SIGCONT); > + zwarn("job can't be suspended"); > + } else { Sometimes, zsh segfaults here while doing B03print.ztst in POSIX locale with thisjob equals to -1. Not 100% reproducable, though. $ LC_ALL=3DC zsh +Z -f ./ztst.zsh ./B03print.ztst =2E/B03print.ztst: starting. [1] 20076 segmentation fault (core dumped) LC_ALL=3DC zsh +Z -f ./ztst.= zsh ./B03print.ztst =2E.. Core was generated by `zsh +Z -f ./ztst.zsh ./B03print.ztst'. Program terminated with signal 11, Segmentation fault. #0 0x00000000004745b1 in wait_for_processes () at signals.c:494 494 (list_pipe && (jobtab[thisjob].stat & STAT_BUILTIN= ))) && (gdb) list 489 * Find the process and job containing this pid and 490 * update it. 491 */ 492 if (findproc(pid, &jn, &pn, 0)) { 493 if (((jn->stat & STAT_BUILTIN) || 494 (list_pipe && (jobtab[thisjob].stat & STAT_BUILTIN= ))) && 495 WIFSTOPPED(status) && WSTOPSIG(status) =3D=3D SIGTS= TP) { 496 killjb(jn, SIGCONT); 497 zwarn("job can't be suspended"); 498 } else { (gdb) p thisjob $1 =3D -1 --=20 Regards, -- Sir Raorn. --- http://thousandsofhate.blogspot.com/ --SUOF0GtieIMvvwua Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJObg5WAAoJEErPkC6vOrpJNxAQAJ7OQMyk0h4ERQ/obvCtM7sk Fw7P/M/LE+5sMSS0emEHpz09Bb1Hf70JBtth3sZNIyYDWk/Z0WOlcgOT9mvTNmxf 7EzdkJmW4nYxmOwvHtCgUytSVANFWmShouBSgnU4ROxbQsPDXgX0FFejPl+5ryMx p5sK9YQOW3VnHs6iuef/YWweW6+B8S3GPNCo4yT27WyI+2JS5c6UbB5m5uYU9+qU D3PXXRgx4/00fm0UDEp9oVFxsnxDy+PrCwwulKWtzHU9ZmCU4HOfJH3BiP3Cbn/o yF2Qhz6jqgw2Wv8OgTJW45rOz5WYhDGs1INGvL91pVK/Q6kUnx48QGwgjXavKo/E ktlGCprN7UiyA0RwcD1ylIz3Bvcs1TO+SeM3hvdNTdttuR30GMc02X/CqYLI4LOs ziVqngcGRuqSu8A9EMDlonRDUDoQJZIS6BpNTswIQow0fZHeK/hyBgBifDXBikB3 8MkqdM91GPQlA/iEtVPWT5EPVS6tBR7W3RKDaomh3pvOOdsnB+5iutrd1MIdhaOu KG6CWcJmzQ5ugqQyTfPblZElH73LZC3JFqiksu3bLhj3krzNX9buL3BjLwzmJmQm 16mi+UC/rMaPjdebVybZrN654AsaCgA16BOIxtGIwQ8LbhEiCl1//AEmhTbwLd3Q qrWLF2AJxMKTh4BS4SWL =J9RY -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua--