version 1.145, 2020/01/04 12:50:52 |
version 1.146, 2020/01/04 16:16:37 |
|
|
static void continue_job(Job *); |
static void continue_job(Job *); |
static Job *reap_finished_job(pid_t); |
static Job *reap_finished_job(pid_t); |
static bool reap_jobs(void); |
static bool reap_jobs(void); |
|
static void may_continue_heldback_jobs(); |
|
|
static void loop_handle_running_jobs(void); |
static void loop_handle_running_jobs(void); |
static bool expensive_job(Job *); |
static bool expensive_job(Job *); |
|
|
{ |
{ |
nJobs--; |
nJobs--; |
postprocess_job(job); |
postprocess_job(job); |
|
} |
|
|
|
static void |
|
may_continue_heldback_jobs() |
|
{ |
while (!no_new_jobs) { |
while (!no_new_jobs) { |
if (heldJobs != NULL) { |
if (heldJobs != NULL) { |
job = heldJobs; |
Job *job = heldJobs; |
heldJobs = heldJobs->next; |
heldJobs = heldJobs->next; |
if (DEBUG(EXPENSIVE)) |
if (DEBUG(EXPENSIVE)) |
fprintf(stderr, "[%ld] cheap -> release %s\n", |
fprintf(stderr, "[%ld] cheap -> release %s\n", |
|
|
job_handle_status(job, status); |
job_handle_status(job, status); |
determine_job_next_step(job); |
determine_job_next_step(job); |
} |
} |
|
may_continue_heldback_jobs(); |
} |
} |
/* sanity check, should not happen */ |
/* sanity check, should not happen */ |
if (pid == -1 && errno == ECHILD && runningJobs != NULL) |
if (pid == -1 && errno == ECHILD && runningJobs != NULL) |