Commit a21a33e
committed
Remove temporary slurm resume file at the end of resume_program
Prior this commit, the code only had `trap "rm -f ${SLURM_RESUME_FILE_TMP}" EXIT`, which works fine for the script until the `sudo -u` happens. When using `sudo -u` to run a command, it creates a new process with a different user context. The trap that was set in the parent shell does not carry over to this new process. Therefore, when the script ends through the sudo command, the EXIT trap in the original shell never gets executed.
Therefore, this commit add another removal of temporary file at the end of the script
Signed-off-by: Hanwen <[email protected]>1 parent 6c83475 commit a21a33e
File tree
1 file changed
+2
-0
lines changed- cookbooks/aws-parallelcluster-slurm/templates/default/slurm
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
0 commit comments