From 27dd2a39a56880fb074c972632739d3483442c58 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Fri, 13 Aug 2010 17:25:26 +0000
Subject: [PATCH] apply patch to postgres

---
 src/plugins/accounting_storage/pgsql/as_pg_job.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/plugins/accounting_storage/pgsql/as_pg_job.c b/src/plugins/accounting_storage/pgsql/as_pg_job.c
index 0b06566c179..6fa3d233a98 100644
--- a/src/plugins/accounting_storage/pgsql/as_pg_job.c
+++ b/src/plugins/accounting_storage/pgsql/as_pg_job.c
@@ -893,13 +893,14 @@ js_pg_step_complete(pgsql_conn_t *pg_conn,
 		elapsed = 0;	/* For *very* short jobs, if clock is wrong */
 
 	exit_code = step_ptr->exit_code;
-	if (exit_code == NO_VAL) {
+	if (WIFSIGNALED(exit_code)) {
 		comp_status = JOB_CANCELLED;
-		exit_code = 0;
 	} else if (exit_code)
 		comp_status = JOB_FAILED;
-	else
+	else {
+		step_ptr->requid = -1;
 		comp_status = JOB_COMPLETE;
+	}
 
 	/* figure out the ave of the totals sent */
 	if(cpus > 0) {
-- 
GitLab