From 69d5d94b7982c6d50ff99ce5a7393980b5400d1b Mon Sep 17 00:00:00 2001
From: Ben Roberts <ben@schedmd.com>
Date: Wed, 22 May 2019 15:13:30 -0500
Subject: [PATCH] Clarify how SLURM_SUBMIT_DIR is set in salloc/sbatch/srun man
 pages.

Bug 7092.
---
 doc/man/man1/salloc.1 | 5 +++--
 doc/man/man1/sbatch.1 | 5 +++--
 doc/man/man1/srun.1   | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1
index 0c9cb42a5ca..5ce88080ed3 100644
--- a/doc/man/man1/salloc.1
+++ b/doc/man/man1/salloc.1
@@ -1,4 +1,4 @@
-.TH salloc "1" "Slurm Commands" "February 2019" "Slurm Commands"
+.TH salloc "1" "Slurm Commands" "May 2019" "Slurm Commands"
 
 .SH "NAME"
 salloc \- Obtain a Slurm job allocation (a set of nodes), execute a command,
@@ -1692,7 +1692,8 @@ Same as \fB\-\-mem\fR
 Set to count of components in heterogeneous job.
 .TP
 \fBSLURM_SUBMIT_DIR\fR
-The directory from which \fBsalloc\fR was invoked.
+The directory from which \fBsalloc\fR was invoked or, if applicable, the
+directory specified by the \fB\-D, \-\-chdir\fR option.
 .TP
 \fBSLURM_SUBMIT_HOST\fR
 The hostname of the computer from which \fBsalloc\fR was invoked.
diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1
index c5be7238ed9..78d0b73d428 100644
--- a/doc/man/man1/sbatch.1
+++ b/doc/man/man1/sbatch.1
@@ -1,4 +1,4 @@
-.TH sbatch "1" "Slurm Commands" "February 2019" "Slurm Commands"
+.TH sbatch "1" "Slurm Commands" "May 2019" "Slurm Commands"
 
 .SH "NAME"
 sbatch \- Submit a batch script to Slurm.
@@ -2043,7 +2043,8 @@ explicitly requeued, this will be sent to the number of times
 the job has been restarted.
 .TP
 \fBSLURM_SUBMIT_DIR\fR
-The directory from which \fBsbatch\fR was invoked.
+The directory from which \fBsbatch\fR was invoked or, if applicable, the
+directory specified by the \fB\-D, \-\-chdir\fR option.
 .TP
 \fBSLURM_SUBMIT_HOST\fR
 The hostname of the computer from which \fBsbatch\fR was invoked.
diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1
index d83728088c0..adac6331ed8 100644
--- a/doc/man/man1/srun.1
+++ b/doc/man/man1/srun.1
@@ -1,4 +1,4 @@
-.TH srun "1" "Slurm Commands" "November 2018" "Slurm Commands"
+.TH srun "1" "Slurm Commands" "May 2019" "Slurm Commands"
 
 .SH "NAME"
 srun \- Run parallel jobs
@@ -2801,7 +2801,8 @@ Number of processes per node within the step.
 The step ID of the current job.
 .TP
 \fBSLURM_SUBMIT_DIR\fR
-The directory from which \fBsrun\fR was invoked.
+The directory from which \fBsrun\fR was invoked or, if applicable, the
+directory specified by the \fB\-D, \-\-chdir\fR option.
 .TP
 \fBSLURM_SUBMIT_HOST\fR
 The hostname of the computer from which \fBsalloc\fR was invoked.
-- 
GitLab