From c3b8b6c1ebc93882e317aaa08a30f565c7404a32 Mon Sep 17 00:00:00 2001
From: Mark Grondona <mgrondona@llnl.gov>
Date: Tue, 30 Sep 2003 17:34:04 +0000
Subject: [PATCH]  o print error message if slurmd session manager is killed by
 a signal

---
 src/slurmd/mgr.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/slurmd/mgr.c b/src/slurmd/mgr.c
index c4fca76c5d1..8bf45e24017 100644
--- a/src/slurmd/mgr.c
+++ b/src/slurmd/mgr.c
@@ -766,10 +766,15 @@ _wait_for_session(slurmd_job_t *job)
 
     done:
 	if (WIFSIGNALED(status)) {
+
+		error ("slurmd session manager killed by signal %d",
+		       WTERMSIG(status));
+
 		/*
 		 * Make sure all processes in session are dead
 		 */
-		killpg(job->smgr_pid, SIGKILL);
+		if (job->smgr_pid > (pid_t) 0)
+			killpg(job->smgr_pid, SIGKILL);
 		return ESLURMD_SESSION_KILLED;
 	}
 
-- 
GitLab