Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Job table full
- X-seq: zsh-users 7476
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: Job table full
- Date: Tue, 25 May 2004 10:56:05 -0700
- Cc: Nicolas Cavigneaux <bounga@xxxxxxxxxx>, zsh-users@xxxxxxxxxx
- In-reply-to: <7993.1084369229@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <pan.2004.05.12.12.49.13.227460@xxxxxxxxxx> <7993.1084369229@xxxxxxx>
On Wed, May 12, 2004 at 02:40:29PM +0100, Peter Stephenson wrote:
> A reliable way of reproducing it would help.
It's pretty easy:
zsh -f
preexec() { x=`echo hi` }
sleep 1 &
: [execute any 20 commands]
The problem appears to be that, after the job-control run, the value of
"thisjob" in the preexec() function becomes -1. This comparison then
fails due to a signed/unsigned mismatch:
if (thisjob >= jobtabsize - 1 && !expandjobtab()) {
This -1 value for "thisjob" only seems to affect a fork in preexec()
(running normal commands doesn't call zfork() with thisjob set to -1).
I fixed the problem by simply adding an "(int)" cast in front of the
jobtabsize value, but perhaps the value of "thisjob" should really be
fixed so that it doesn't get left at -1?
..wayne..
--- Src/exec.c 21 May 2004 11:19:30 -0000 1.62
+++ Src/exec.c 25 May 2004 17:51:40 -0000
@@ -219,7 +219,7 @@ zfork(void)
/*
* Is anybody willing to explain this test?
*/
- if (thisjob >= jobtabsize - 1 && !expandjobtab()) {
+ if (thisjob >= (int)jobtabsize - 1 && !expandjobtab()) {
zerr("job table full", NULL, 0);
return -1;
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author