diff --git a/src/sview/job_info.c b/src/sview/job_info.c index dd3f862d99cf9ef006b84cfa064313d09fbe5e3c..6773ca9f16977181fc7295b6b3b58c7a6c6d3a1e 100644 --- a/src/sview/job_info.c +++ b/src/sview/job_info.c @@ -552,22 +552,13 @@ static int _cancel_job_id (uint32_t job_id, uint16_t signal) { int error_code = SLURM_SUCCESS, i; char *temp = NULL; -#ifdef HAVE_FRONT_END - bool msg_to_ctld = true; -#else - bool msg_to_ctld = false; -#endif if (signal == (uint16_t)-1) signal = SIGKILL; - if (signal == SIGKILL) - msg_to_ctld = true; - for (i = 0; i < MAX_CANCEL_RETRY; i++) { - if (msg_to_ctld) - error_code = slurm_kill_job(job_id, signal, false); - else - error_code = slurm_signal_job(job_id, signal); + /* NOTE: RPC always sent to slurmctld rather than directly + * to slurmd daemons */ + error_code = slurm_kill_job(job_id, signal, false); if (error_code == 0 || (errno != ESLURM_TRANSITION_STATE_NO_UPDATE && errno != ESLURM_JOB_PENDING)) @@ -600,24 +591,18 @@ static int _cancel_step_id(uint32_t job_id, uint32_t step_id, { int error_code = SLURM_SUCCESS, i; char *temp = NULL; -#ifdef HAVE_FRONT_END - bool msg_to_ctld = true; -#else - bool msg_to_ctld = false; -#endif if (signal == (uint16_t)-1) signal = SIGKILL; for (i = 0; i < MAX_CANCEL_RETRY; i++) { - if (msg_to_ctld) { - error_code = slurm_kill_job_step(job_id, step_id, - signal); - } else if (signal == SIGKILL) { + /* NOTE: RPC always sent to slurmctld rather than directly + * to slurmd daemons */ + if (signal == SIGKILL) { error_code = slurm_terminate_job_step(job_id, step_id); } else { - error_code = slurm_signal_job_step(job_id, step_id, - signal); + error_code = slurm_kill_job_step(job_id, step_id, + signal); } if (error_code == 0 || (errno != ESLURM_TRANSITION_STATE_NO_UPDATE