From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Not quite out of the pipestatus woods yet ...
Date: Sat, 26 Oct 2013 09:57:46 -0700 [thread overview]
Message-ID: <131026095746.ZM8910@torch.brasslantern.com> (raw)
In-Reply-To: <131026004551.ZM32043@torch.brasslantern.com>
On Oct 26, 12:45am, Bart Schaefer wrote:
}
} I think it has something to do with the oldjobtab / jobtab switching, but
} have not yet confirmed.
Yes, this definitely it.
[[ DO NOT APPLY THIS DIFF AS A PATCH. Included for explanation only. ]]
diff --git a/Src/jobs.c b/Src/jobs.c
index c218743..d5e316f 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -945,6 +945,13 @@ printjob(Job jn, int lng, int synch)
job = jn - oldjobtab;
else
job = jn - jobtab;
+ /*
+ DPUTS3(job < 0 || job > maxjob,
+ "bogus job number, jn = %L, jobtab = %L, oldjobtab = %L",
+ (long)jn, (long)jobtab, (long)oldjobtab);
+ */
+ if (job < 0 || job > maxjob)
+ job = jn - jobtab;
if (jn->stat & STAT_NOPRINT) {
skip_print = 1;
With this code change, the stress test never prints the wrong $pipestatus,
regardless of the order of signals arriving.
HOWEVER, with the "setopt MONITOR" added before the stress test, I have
had the shell go into a fast busy in acquire_pgrp() -- the while loop
condition never becomes false but the shell never gets SIGT* either.
I think that's a separate problem, but: PWS, do you remember enough
about why there is an assumption that oldjobtab never needs to be set
back to NULL once it has been created? Or is this just a case of not
realizing that printjob() has multiple responsibilities, including the
reaping of old jobs?
next prev parent reply other threads:[~2013-10-26 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 23:25 Bart Schaefer
2013-10-26 7:45 ` Bart Schaefer
2013-10-26 16:57 ` Bart Schaefer [this message]
2013-10-26 22:53 ` Peter Stephenson
2013-10-26 22:55 ` Bart Schaefer
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=131026095746.ZM8910@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--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).