From 106666cbf49d15f5281b97c761aea8d1ea37a19f Mon Sep 17 00:00:00 2001
From: Nathan Rini <nate@schedmd.com>
Date: Mon, 28 Jan 2019 14:14:05 -0700
Subject: [PATCH] Add description of return code to man pages of sbatch and
 salloc.

Bug 6208.
---
 doc/man/man1/salloc.1 | 5 +++++
 doc/man/man1/sbatch.1 | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1
index ac36cf4cf3d..fa1e640debb 100644
--- a/doc/man/man1/salloc.1
+++ b/doc/man/man1/salloc.1
@@ -36,6 +36,11 @@ settings and is designed to be executed in the foreground. If you need to
 execute salloc in the background, set its standard input to some file, for
 example: "salloc \-n16 a.out </dev/null &"
 
+.SH "RETURN VALUE"
+If salloc is unable to execute the user script, it will
+return 1 and print errors to stderr. Else if success or if killed by signals
+HUP, INT, KILL, or QUIT: it will return 0.
+
 .SH "OPTIONS"
 .LP
 
diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1
index 8a5d2b6aa19..dd93cfcf9c5 100644
--- a/doc/man/man1/sbatch.1
+++ b/doc/man/man1/sbatch.1
@@ -36,6 +36,9 @@ allocation of cpus to jobs and tasks.
 .br
 https://slurm.schedmd.com/cpu_management.html
 
+.SH "RETURN VALUE"
+sbatch will return 0 on success or error code on failure.
+
 .SH "OPTIONS"
 .LP
 
-- 
GitLab