Skip to content
Snippets Groups Projects
Commit 04bc626a authored by Moe Jette's avatar Moe Jette
Browse files

Don't bother to send separate SIGKILL message to each node for each step

on a job kill. Let the KILL_JOB RPC do all of the cleanup. This removes
a redundant RPC. - Moe
parent ab6b5db1
No related branches found
No related tags found
No related merge requests found
...@@ -1211,23 +1211,24 @@ int job_signal(uint32_t job_id, uint16_t signal, uid_t uid) ...@@ -1211,23 +1211,24 @@ int job_signal(uint32_t job_id, uint16_t signal, uid_t uid)
} }
if (job_ptr->job_state == JOB_RUNNING) { if (job_ptr->job_state == JOB_RUNNING) {
ListIterator step_record_iterator;
struct step_record *step_ptr;
step_record_iterator =
list_iterator_create (job_ptr->step_list);
while ((step_ptr = (struct step_record *)
list_next (step_record_iterator))) {
signal_step_tasks(step_ptr, signal);
}
list_iterator_destroy (step_record_iterator);
if (signal == SIGKILL) { if (signal == SIGKILL) {
/* No need to signal steps, deallocate kills them */
job_ptr->time_last_active = now; job_ptr->time_last_active = now;
job_ptr->end_time = now; job_ptr->end_time = now;
last_job_update = now; last_job_update = now;
job_ptr->job_state = JOB_COMPLETE | JOB_COMPLETING; job_ptr->job_state = JOB_COMPLETE | JOB_COMPLETING;
deallocate_nodes(job_ptr, false); deallocate_nodes(job_ptr, false);
} else {
ListIterator step_record_iterator;
struct step_record *step_ptr;
step_record_iterator =
list_iterator_create (job_ptr->step_list);
while ((step_ptr = (struct step_record *)
list_next (step_record_iterator))) {
signal_step_tasks(step_ptr, signal);
}
list_iterator_destroy (step_record_iterator);
} }
verbose("job_signal %u of running job %u successful", verbose("job_signal %u of running job %u successful",
signal, job_id); signal, job_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment