From 5068c9501d9948ccf7ae95fb306030101c826eea Mon Sep 17 00:00:00 2001 From: gcorbin Date: Wed, 23 Jul 2025 10:21:42 +0000 Subject: [PATCH] examples/jobsystem: always create the done_file Ensure that the done_file is always written, even in case that the job script exits early with an error, for example due to time limit. Also write the exit status to the done_file. This enables easy verification that all jobs completed successfully. --- examples/jobsystem/job.run.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/jobsystem/job.run.in b/examples/jobsystem/job.run.in index e1f4453d..6d1f2955 100644 --- a/examples/jobsystem/job.run.in +++ b/examples/jobsystem/job.run.in @@ -8,5 +8,11 @@ ### start of jobscript +# Always create the done_file at exit +write_job_status() +{ + printf "$?" > #READY# +} +trap write_job_status EXIT + #EXEC# -touch #READY#