diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2009-07-12 15:09:56 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-07-12 15:09:56 +0000 |
| commit | 3257f6b8d561cdf8805744d2a988b4bf414249fc (patch) | |
| tree | 0fd39eb26cadc23d17368c91217067816745c331 /Src/jobs.c | |
| parent | 27131: allow MONITOR in subshell by not closing SHTTY (diff) | |
| download | zsh-3257f6b8d561cdf8805744d2a988b4bf414249fc.tar zsh-3257f6b8d561cdf8805744d2a988b4bf414249fc.tar.gz zsh-3257f6b8d561cdf8805744d2a988b4bf414249fc.tar.bz2 zsh-3257f6b8d561cdf8805744d2a988b4bf414249fc.tar.lz zsh-3257f6b8d561cdf8805744d2a988b4bf414249fc.tar.xz zsh-3257f6b8d561cdf8805744d2a988b4bf414249fc.tar.zst zsh-3257f6b8d561cdf8805744d2a988b4bf414249fc.zip | |
27134: Close SHTTY on exec.
27135: POSIX_JOBS leaves MONITOR on in subshell and doesn't save
parent job table.
Diffstat (limited to 'Src/jobs.c')
| -rw-r--r-- | Src/jobs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/jobs.c b/Src/jobs.c index 8e48ed4b8..df7d9d689 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -1292,6 +1292,8 @@ clearjobtab(int monitor) { int i; + if (isset(POSIXJOBS)) + oldmaxjob = 0; for (i = 1; i <= maxjob; i++) { /* * See if there is a jobtable worth saving. @@ -1299,7 +1301,7 @@ clearjobtab(int monitor) * once for each subshell of a shell with job control, * so doesn't create a leak. */ - if (monitor && jobtab[i].stat) + if (monitor && !isset(POSIXJOBS) && jobtab[i].stat) oldmaxjob = i+1; else if (jobtab[i].stat & STAT_INUSE) freejob(jobtab + i, 0); |
