From 2f4f556283d062394a6b166711c6e29b141d0d12 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Wed, 15 Jan 2003 21:28:25 +0000
Subject: [PATCH] New field added to job_info RPC: batch_sid.

---
 src/api/job_info.c | 5 +++--
 src/api/slurm.h    | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/api/job_info.c b/src/api/job_info.c
index 9630445e772..90ec778bf30 100644
--- a/src/api/job_info.c
+++ b/src/api/job_info.c
@@ -77,8 +77,9 @@ slurm_print_job_info ( FILE* out, job_info_t * job_ptr )
 	fprintf ( out, "JobState=%s TimeLimit=%u\n", 
 		job_state_string(job_ptr->job_state), job_ptr->time_limit);
 
-	fprintf ( out, "   Priority=%u Partition=%s BatchFlag=%u\n", 
-		job_ptr->priority, job_ptr->partition, job_ptr->batch_flag);
+	fprintf ( out, "   Priority=%u Partition=%s BatchFlag:Sid=%u:%u\n", 
+		job_ptr->priority, job_ptr->partition, 
+		job_ptr->batch_flag, job_ptr->batch_sid);
 
 	make_time_str ((time_t *)&job_ptr->start_time, time_str);
 	fprintf ( out, "   StartTime=%s ", time_str);
diff --git a/src/api/slurm.h b/src/api/slurm.h
index a98698f585c..31f87fc9e58 100644
--- a/src/api/slurm.h
+++ b/src/api/slurm.h
@@ -177,6 +177,7 @@ typedef struct job_info {
 	uint32_t job_id;	/* job ID */
 	char *name;		/* name of the job */
 	uint16_t batch_flag;	/* 1 if batch: queued job with script */
+	uint32_t batch_sid;	/* session id of running batch job */
 	uint32_t user_id;	/* user the job runs as */
 	uint16_t job_state;	/* state of the job, see enum job_states */
 	uint32_t time_limit;	/* maximum run time in minutes or INFINITE */
-- 
GitLab