diff --git a/src/slurmd/req.c b/src/slurmd/req.c index a849b4e16b78aa639d2a3af71c0fc266d6e6235c..dcd4546ef8ae1c120197da60300cd3d94bf7e6d8 100644 --- a/src/slurmd/req.c +++ b/src/slurmd/req.c @@ -755,8 +755,15 @@ _rpc_kill_tasks(slurm_msg_t *msg, slurm_addr *cli_addr) } if ((req->signal == SIGKILL) - || (req->signal == SIGINT) /* concession to proctrack/linuxproc */ - || (req->signal == 0)) { + || (req->signal == SIGINT)) { /* for proctrack/linuxproc */ + /* + * Assume step termination request. + * Send SIGCONT just in case the processes are stopped. + */ + slurm_signal_container(step->cont_id, SIGCONT); + if (slurm_signal_container(step->cont_id, req->signal) < 0) + rc = errno; + } else if (req->signal == 0) { if (slurm_signal_container(step->cont_id, req->signal) < 0) rc = errno; /* SIGMIGRATE and SIGSOUND are used to initiate job checkpoint on AIX. @@ -1166,6 +1173,12 @@ _rpc_kill_job(slurm_msg_t *msg, slurm_addr *cli) debug("credential for job %u revoked", req->job_id); } + /* + * Tasks might be stopped (possibly by a debugger) + * so send SIGCONT first. + */ + _kill_all_active_steps(req->job_id, SIGCONT, true); + nsteps = _kill_all_active_steps(req->job_id, SIGTERM, true); /*