zsh-users
 help / color / mirror / code / Atom feed
* Job table full
@ 2004-05-12 12:49 Nicolas Cavigneaux
  2004-05-12 13:40 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Cavigneaux @ 2004-05-12 12:49 UTC (permalink / raw)
  To: zsh-users

Hi all,

I'm using ZSH 4.2.0 and after having used the shell for a while it tells
me "job table full" each time I run a command. I want to know if it is
possible to set this warning off and how.

Thank you for your help.

Bye.
-- 
Nicolas Cavigneaux | GPG KeyID : F0954C41
bounga@altern.org  | http://bounga.ath.cx


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Job table full
  2004-05-12 12:49 Job table full Nicolas Cavigneaux
@ 2004-05-12 13:40 ` Peter Stephenson
  2004-05-12 13:52   ` Nicolas Cavigneaux
  2004-05-25 17:56   ` Wayne Davison
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Stephenson @ 2004-05-12 13:40 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: zsh-users

Nicolas Cavigneaux wrote:
> Hi all,
> 
> I'm using ZSH 4.2.0 and after having used the shell for a while it tells
> me "job table full" each time I run a command. I want to know if it is
> possible to set this warning off and how.

We had a report about this problem before, see my reply in

http://www.zsh.org/mla/workers/2004/msg00455.html

Unfortunately we haven't enough information to fix it.  A reliable way
of reproducing it would help.  `After a while' isn't good enough; only a
few people have seen it (about three reports to date).

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Job table full
  2004-05-12 13:40 ` Peter Stephenson
@ 2004-05-12 13:52   ` Nicolas Cavigneaux
  2004-05-25 17:56   ` Wayne Davison
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Cavigneaux @ 2004-05-12 13:52 UTC (permalink / raw)
  To: zsh-users

Le Wed, 12 May 2004 14:40:29 +0100, Peter Stephenson a écrit :

> We had a report about this problem before, see my reply in
> 
> http://www.zsh.org/mla/workers/2004/msg00455.html
> 
> Unfortunately we haven't enough information to fix it.  A reliable way of
> reproducing it would help.  `After a while' isn't good enough; only a few
> people have seen it (about three reports to date).

I've read your post. I will run gdb on zsh and try to see what I get for
the variables maxjob, jobtabsize.

If I find a way to reproduce this, I'll post a followup to this thread. 

Good bye.
-- 
Nicolas Cavigneaux | GPG KeyID : F0954C41
bounga@altern.org  | http://bounga.ath.cx


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Job table full
  2004-05-12 13:40 ` Peter Stephenson
  2004-05-12 13:52   ` Nicolas Cavigneaux
@ 2004-05-25 17:56   ` Wayne Davison
  1 sibling, 0 replies; 4+ messages in thread
From: Wayne Davison @ 2004-05-25 17:56 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Nicolas Cavigneaux, zsh-users

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

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..

[-- Attachment #2: zfork.patch --]
[-- Type: text/plain, Size: 361 bytes --]

--- 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;
     }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-25 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-12 12:49 Job table full Nicolas Cavigneaux
2004-05-12 13:40 ` Peter Stephenson
2004-05-12 13:52   ` Nicolas Cavigneaux
2004-05-25 17:56   ` Wayne Davison

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).