diff --git a/src/api/step_ctx.c b/src/api/step_ctx.c
index e5409ad43acae45e8b1a6ff97801982d80f3ac50..0302c6652f647eaff7173b7c78db929347e7e725 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);