=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/job.c,v retrieving revision 1.66 retrieving revision 1.67 diff -c -r1.66 -r1.67 *** src/usr.bin/make/job.c 2007/09/16 15:12:12 1.66 --- src/usr.bin/make/job.c 2007/09/17 08:36:57 1.67 *************** *** 1,5 **** /* $OpenPackages$ */ ! /* $OpenBSD: job.c,v 1.66 2007/09/16 15:12:12 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* --- 1,5 ---- /* $OpenPackages$ */ ! /* $OpenBSD: job.c,v 1.67 2007/09/17 08:36:57 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* *************** *** 692,698 **** (void)fprintf(job->cmdFILE, fmt, arg); \ (void)fflush(job->cmdFILE); ! numCommands += 1; /* For debugging, we replace each command with the result of expanding * the variables in the command. */ --- 692,698 ---- (void)fprintf(job->cmdFILE, fmt, arg); \ (void)fflush(job->cmdFILE); ! numCommands++; /* For debugging, we replace each command with the result of expanding * the variables in the command. */ *************** *** 1005,1018 **** } job->flags &= ~JOB_CONTINUING; Lst_AtEnd(&jobs, job); ! nJobs += 1; if (DEBUG(JOB)) { (void)fprintf(stdout, "Process %ld is continuing locally.\n", (long)job->pid); (void)fflush(stdout); } ! nLocal += 1; if (nJobs == maxJobs) { jobFull = true; if (DEBUG(JOB)) { --- 1005,1018 ---- } job->flags &= ~JOB_CONTINUING; Lst_AtEnd(&jobs, job); ! nJobs++; if (DEBUG(JOB)) { (void)fprintf(stdout, "Process %ld is continuing locally.\n", (long)job->pid); (void)fflush(stdout); } ! nLocal++; if (nJobs == maxJobs) { jobFull = true; if (DEBUG(JOB)) { *************** *** 1077,1083 **** Make_Update(job->node); free(job); } else if (*status != 0) { ! errors += 1; free(job); } --- 1077,1083 ---- Make_Update(job->node); free(job); } else if (*status != 0) { ! errors++; free(job); } *************** *** 1236,1242 **** FD_SET(job->inPipe, outputsp); } ! nLocal += 1; /* * XXX: Used to not happen if REMOTE. Why? */ --- 1236,1242 ---- FD_SET(job->inPipe, outputsp); } ! nLocal++; /* * XXX: Used to not happen if REMOTE. Why? */ *************** *** 1249,1255 **** /* * Now the job is actually running, add it to the table. */ ! nJobs += 1; Lst_AtEnd(&jobs, job); if (nJobs == maxJobs) { jobFull = true; --- 1249,1255 ---- /* * Now the job is actually running, add it to the table. */ ! nJobs++; Lst_AtEnd(&jobs, job); if (nJobs == maxJobs) { jobFull = true; *************** *** 2033,2046 **** } else { job = (Job *)Lst_Datum(jnode); Lst_Remove(&jobs, jnode); ! nJobs -= 1; if (jobFull && DEBUG(JOB)) { (void)fprintf(stdout, "Job queue is no longer full.\n"); (void)fflush(stdout); } jobFull = false; ! nLocal -= 1; } JobFinish(job, &status); --- 2033,2046 ---- } else { job = (Job *)Lst_Datum(jnode); Lst_Remove(&jobs, jnode); ! nJobs--; if (jobFull && DEBUG(JOB)) { (void)fprintf(stdout, "Job queue is no longer full.\n"); (void)fflush(stdout); } jobFull = false; ! nLocal--; } JobFinish(job, &status); *************** *** 2091,2097 **** job = (Job *)Lst_Datum(ln); if (FD_ISSET(job->inPipe, readfdsp)) { JobDoOutput(job, false); ! nfds -= 1; } } } --- 2091,2097 ---- job = (Job *)Lst_Datum(ln); if (FD_ISSET(job->inPipe, readfdsp)) { JobDoOutput(job, false); ! nfds--; } } }