From: "Alexey I. Froloff" <raorn@altlinux.org>
To: zsh-workers@zsh.org
Subject: Re: How to misplace an entire pipeline
Date: Mon, 12 Sep 2011 17:51:23 +0400 [thread overview]
Message-ID: <20110912135123.GA12110@altlinux.org> (raw)
In-Reply-To: <110813115208.ZM20513@torch.brasslantern.com>
[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]
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) == 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=C zsh +Z -f ./ztst.zsh ./B03print.ztst
./B03print.ztst: starting.
[1] 20076 segmentation fault (core dumped) LC_ALL=C zsh +Z -f ./ztst.zsh ./B03print.ztst
...
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) == SIGTSTP) {
496 killjb(jn, SIGCONT);
497 zwarn("job can't be suspended");
498 } else {
(gdb) p thisjob
$1 = -1
--
Regards, --
Sir Raorn. --- http://thousandsofhate.blogspot.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2011-09-12 13:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 3:31 Bart Schaefer
2011-08-07 17:50 ` Peter Stephenson
2011-08-07 21:43 ` Bart Schaefer
2011-08-08 4:05 ` Bart Schaefer
2011-08-08 18:27 ` Peter Stephenson
2011-08-09 6:10 ` Bart Schaefer
2011-08-09 20:19 ` Peter Stephenson
2011-08-13 18:52 ` Bart Schaefer
2011-08-13 20:15 ` Bart Schaefer
2011-09-12 13:51 ` Alexey I. Froloff [this message]
2011-09-12 16:03 ` Bart Schaefer
2011-09-12 16:18 ` Bart Schaefer
2011-09-12 16:35 ` Peter Stephenson
2011-09-15 14:57 ` Alexey I. Froloff
2011-09-16 16:16 ` Bart Schaefer
2011-09-12 16:27 ` Alexey I. Froloff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110912135123.GA12110@altlinux.org \
--to=raorn@altlinux.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).