From 834001843d70724d13ecd716c4b345e7250eec34 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Wed, 16 Mar 2016 12:12:00 -0700 Subject: [PATCH] Add signal number to error message This will improve ability to diagnose problems if the srun is killed by a signal. --- src/api/step_ctx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/step_ctx.c b/src/api/step_ctx.c index e5409ad43ac..0302c6652f6 100644 --- a/src/api/step_ctx.c +++ b/src/api/step_ctx.c @@ -80,7 +80,7 @@ static void _signal_while_allocating(int signo) if (signo == SIGCONT) return; - destroy_step = 1; + destroy_step = signo; } static void @@ -272,7 +272,8 @@ slurm_step_ctx_create_timeout (const slurm_step_ctx_params_t *step_params, } xsignal_block(step_signals); if (destroy_step) { - info("Cancelled pending job step"); + info("Cancelled pending job step with signal %d", + destroy_step); errno = ESLURM_ALREADY_DONE; } else rc = slurm_job_step_create(step_req, &step_resp); -- GitLab