From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: Bogus job number
Date: Tue, 29 Oct 2013 09:23:21 -0700 [thread overview]
Message-ID: <131029092322.ZM27356@torch.brasslantern.com> (raw)
In-Reply-To: <20131029152305.1d282b58@pwslap01u.europe.root.pri>
On Oct 29, 3:23pm, Peter Stephenson wrote:
} Subject: Bogus job number
}
} Reporting for form's sake, though I realise this isn't very useful as it
} stands... After suspending and resuming (in the foreground) a
} CPU-intensive make, I got
}
} jobs.c:950: bogus job number, jn = 140813044, jobtab = 140813008, oldjobtab = 0
} [1] + continued make...
}
} I haven't seen this before, so I guess we've managed to introduce a new
} race to make up for all the old ones that have gone...
Well, it could just be that the condition tested in DPUTS3() is wrong.
This is coming from:
944 if (synch > 1 && oldjobtab != NULL)
945 job = jn - oldjobtab;
946 else
947 job = jn - jobtab;
948 DPUTS3(job < 0 || job > (synch > 1 ? oldmaxjob : maxjob),
949 "bogus job number, jn = %L, jobtab = %L, oldjobtab = %L",
950 (long)jn, (long)jobtab, (long)oldjobtab);
And yes, I immediately see a problem with that.
diff --git a/Src/jobs.c b/Src/jobs.c
index 336c5d4..371b8eb 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -945,7 +945,7 @@ printjob(Job jn, int lng, int synch)
job = jn - oldjobtab;
else
job = jn - jobtab;
- DPUTS3(job < 0 || job > (synch > 1 ? oldmaxjob : maxjob),
+ DPUTS3(job < 0 || job > (oldjobtab && synch > 1 ? oldmaxjob : maxjob),
"bogus job number, jn = %L, jobtab = %L, oldjobtab = %L",
(long)jn, (long)jobtab, (long)oldjobtab);
--
Barton E. Schaefer
prev parent reply other threads:[~2013-10-29 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 15:23 Peter Stephenson
2013-10-29 16:23 ` Bart Schaefer [this message]
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=131029092322.ZM27356@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).