diff options
author | Bruce Evans <bde@FreeBSD.org> | 1995-09-21 13:24:20 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1995-09-21 13:24:20 +0000 |
commit | beff52884f517a15657f69373b0b752c9fced7ab (patch) | |
tree | ee82fe3468f2479e5c766950834d4bbc82c859f8 /bin | |
parent | 4d34303860ae0e4e1cae4a048271bfd86ec22350 (diff) | |
download | src-test2-beff52884f517a15657f69373b0b752c9fced7ab.tar.gz src-test2-beff52884f517a15657f69373b0b752c9fced7ab.zip |
Notes
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/jobs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index c950bd4578a3..ec8a6490f8dc 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: jobs.c,v 1.2 1994/09/24 02:57:41 davidg Exp $ + * $Id: jobs.c,v 1.3 1995/05/30 00:07:18 rgrimes Exp $ */ #ifndef lint @@ -459,7 +459,14 @@ makejob(node, nprocs) if (njobs == 0) { jobtab = ckmalloc(4 * sizeof jobtab[0]); } else { + struct job *ojp; + jp = ckmalloc((njobs + 4) * sizeof jobtab[0]); + for (i = njobs, ojp = jobtab; --i >= 0; + jp++, ojp++) + if (ojp->ps == &ojp->ps0) + ojp->ps = &jp->ps0; + jp -= njobs; bcopy(jobtab, jp, njobs * sizeof jp[0]); ckfree(jobtab); jobtab = jp; |