version 1.66, 2007/09/16 15:12:12 |
version 1.67, 2007/09/17 08:36:57 |
|
|
(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. */ |
|
|
} |
} |
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)) { |
|
|
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); |
} |
} |
|
|
|
|
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? |
*/ |
*/ |
|
|
/* |
/* |
* 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; |
|
|
} 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); |
|
|
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--; |
} |
} |
} |
} |
} |
} |