[BACK]Return to job.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/job.c between version 1.66 and 1.67

version 1.66, 2007/09/16 15:12:12 version 1.67, 2007/09/17 08:36:57
Line 692 
Line 692 
    (void)fprintf(job->cmdFILE, fmt, arg);       \     (void)fprintf(job->cmdFILE, fmt, arg);       \
    (void)fflush(job->cmdFILE);     (void)fflush(job->cmdFILE);
   
         numCommands += 1;          numCommands++;
   
         /* For debugging, we replace each command with the result of expanding          /* For debugging, we replace each command with the result of expanding
          * the variables in the command.  */           * the variables in the command.  */
Line 1005 
Line 1005 
                         }                          }
                         job->flags &= ~JOB_CONTINUING;                          job->flags &= ~JOB_CONTINUING;
                         Lst_AtEnd(&jobs, job);                          Lst_AtEnd(&jobs, job);
                         nJobs += 1;                          nJobs++;
                         if (DEBUG(JOB)) {                          if (DEBUG(JOB)) {
                                 (void)fprintf(stdout,                                  (void)fprintf(stdout,
                                     "Process %ld is continuing locally.\n",                                      "Process %ld is continuing locally.\n",
                                     (long)job->pid);                                      (long)job->pid);
                                 (void)fflush(stdout);                                  (void)fflush(stdout);
                         }                          }
                         nLocal += 1;                          nLocal++;
                         if (nJobs == maxJobs) {                          if (nJobs == maxJobs) {
                                 jobFull = true;                                  jobFull = true;
                                 if (DEBUG(JOB)) {                                  if (DEBUG(JOB)) {
Line 1077 
Line 1077 
                 Make_Update(job->node);                  Make_Update(job->node);
                 free(job);                  free(job);
         } else if (*status != 0) {          } else if (*status != 0) {
                 errors += 1;                  errors++;
                 free(job);                  free(job);
         }          }
   
Line 1236 
Line 1236 
                         FD_SET(job->inPipe, outputsp);                          FD_SET(job->inPipe, outputsp);
                 }                  }
   
                 nLocal += 1;                  nLocal++;
                 /*                  /*
                  * XXX: Used to not happen if REMOTE. Why?                   * XXX: Used to not happen if REMOTE. Why?
                  */                   */
Line 1249 
Line 1249 
         /*          /*
          * Now the job is actually running, add it to the table.           * Now the job is actually running, add it to the table.
          */           */
         nJobs += 1;          nJobs++;
         Lst_AtEnd(&jobs, job);          Lst_AtEnd(&jobs, job);
         if (nJobs == maxJobs) {          if (nJobs == maxJobs) {
                 jobFull = true;                  jobFull = true;
Line 2033 
Line 2033 
                 } else {                  } else {
                         job = (Job *)Lst_Datum(jnode);                          job = (Job *)Lst_Datum(jnode);
                         Lst_Remove(&jobs, jnode);                          Lst_Remove(&jobs, jnode);
                         nJobs -= 1;                          nJobs--;
                         if (jobFull && DEBUG(JOB)) {                          if (jobFull && DEBUG(JOB)) {
                                 (void)fprintf(stdout,                                  (void)fprintf(stdout,
                                     "Job queue is no longer full.\n");                                      "Job queue is no longer full.\n");
                                 (void)fflush(stdout);                                  (void)fflush(stdout);
                         }                          }
                         jobFull = false;                          jobFull = false;
                         nLocal -= 1;                          nLocal--;
                 }                  }
   
                 JobFinish(job, &status);                  JobFinish(job, &status);
Line 2091 
Line 2091 
                                 job = (Job *)Lst_Datum(ln);                                  job = (Job *)Lst_Datum(ln);
                                 if (FD_ISSET(job->inPipe, readfdsp)) {                                  if (FD_ISSET(job->inPipe, readfdsp)) {
                                         JobDoOutput(job, false);                                          JobDoOutput(job, false);
                                         nfds -= 1;                                          nfds--;
                                 }                                  }
                         }                          }
                 }                  }

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67