diff --git a/src/srun/srun.c b/src/srun/srun.c index f6681ae061ab8149b7954e949d1780f311c096a6..bdc107fe85610ab83690f452a98be6d5bbf60805 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -206,11 +206,16 @@ int main(int ac, char **av) /* job is now overdone, clean up * - * If job "failed" send SIGKILL to any remaining tasks + * If job "failed" send SIGKILL to any remaining tasks. + * If job is "forcefully terminated" exit immediately. + * */ if (job->state == SRUN_JOB_FAILED) { info("Terminating job"); fwd_signal(job, SIGKILL); + } else if (job->state == SRUN_JOB_FORCETERM) { + job_destroy(job, 0); + exit(1); } /* wait for launch thread */