diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-05-25 18:38:56 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-05-25 18:38:56 +0000 |
commit | 5ac05cab9f7bfcd5dc9b08a67e18ff5e317f8d1d (patch) | |
tree | 520a30f52d9a59c5749fe36b992784fa703e315a | |
parent | bf4be466765b6f490b15981ecb308664c817535b (diff) | |
download | zsh-5ac05cab9f7bfcd5dc9b08a67e18ff5e317f8d1d.tar.gz zsh-5ac05cab9f7bfcd5dc9b08a67e18ff5e317f8d1d.tar.xz zsh-5ac05cab9f7bfcd5dc9b08a67e18ff5e317f8d1d.zip |
19976: fix spurious job table full messages
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/exec.c | 2 | ||||
-rw-r--r-- | Src/jobs.c | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 19b55ca75..4148933e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-05-25 Peter Stephenson <pws@csr.com> + * 19976: Src/exec.c, Src/jobs.c: `job table full' messages + spotted by many people were traced by Wayne to thisjob + being -1, which wasn't handled in a test no one understands + anyway. + * Compiled by Thorsten Kampe in zsh-users/7474: Doc/Zsh/options.yo: reorder option descriptions into subheadings. diff --git a/Src/exec.c b/Src/exec.c index fe1415845..2af94f582 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -219,7 +219,7 @@ zfork(void) /* * Is anybody willing to explain this test? */ - if (thisjob >= jobtabsize - 1 && !expandjobtab()) { + if (thisjob != -1 && thisjob >= jobtabsize - 1 && !expandjobtab()) { zerr("job table full", NULL, 0); return -1; } diff --git a/Src/jobs.c b/Src/jobs.c index e6ce47113..ba3846654 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -904,6 +904,7 @@ addproc(pid_t pid, char *text, int aux) Process pn, *pnlist; struct timezone dummy_tz; + DPUTS(thisjob == -1, "No valid job in addproc."); pn = (Process) zshcalloc(sizeof *pn); pn->pid = pid; if (text) @@ -1035,6 +1036,7 @@ void waitjobs(void) { Job jn = jobtab + thisjob; + DPUTS(thisjob == -1, "No valid job in waitjobs."); if (jn->procs || jn->auxprocs) zwaitjob(thisjob, 0); @@ -1129,6 +1131,7 @@ spawnjob(void) { Process pn; + DPUTS(thisjob == -1, "No valid job in spawnjob."); /* if we are not in a subshell */ if (!subsh) { if (curjob == -1 || !(jobtab[curjob].stat & STAT_STOPPED)) { |