We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72d2aaa commit c32c52bCopy full SHA for c32c52b
1 file changed
Utilities/Tools/jobutils.sh
@@ -239,6 +239,17 @@ taskwrapper() {
239
trap '' SIGTERM
240
241
o2_cleanup_shm_files #--> better to register a general trap at EXIT
242
+
243
+ # this gives some possibility to customize the wrapper
244
+ # and do some special task at the ordinary exit. The hook takes 3 arguments:
245
+ # - The original command
246
+ # - the logfile
247
+ # - the return code from the execution
248
+ if [ "${JOBUTILS_JOB_ENDHOOK}" ]; then
249
+ hook="${JOBUTILS_JOB_ENDHOOK} '$command' $logfile ${RC}"
250
+ eval "${hook}"
251
+ fi
252
253
return ${RC}
254
}
255
0 commit comments