The target is to implement (mecha)babs support for monitoring entire subject processing job script, so we could do smth like (expressing)
diff --git a/code/participant_job.sh b/code/participant_job.sh
index a49142d..c071ce2 100755
--- a/code/participant_job.sh
+++ b/code/participant_job.sh
@@ -6,6 +6,9 @@
#SBATCH --time=24:00:00
+DUCT_PREFIX="logs/duct_${subid}_" con-duct attach &
+duct_pid=$!
+
# shellcheck disable=SC1091
source /dartfs/rc/lab/D/DBIC/DBIC/CON/asmacdo/mechababs/.venv/bin/activate
@@ -109,7 +112,6 @@ if [ ! -L "${CONTAINER_JOB}" ]; then
exit 1
fi
-export DUCT_PREFIX="logs/duct_${subid}_"
# Step 1: Run BIDS app via containers-run
datalad containers-run \
@@ -156,4 +158,7 @@ echo '# Push the branch with provenance records:'
# shellcheck disable=SC2154
flock "${DSLOCKFILE}" git push outputstore "${BRANCH}"
-echo SUCCESS
\ No newline at end of file
+
+kill "$duct_pid" # inform to gracefully exit
+
+echo SUCCESS
docstring for attach would tell user to use kill potentially with specific signal (9 or INT) as to e.g. trigger killing without graceful shutdown which should happen on default kill which is TERM (15).
and attach will just monitor current session (like we have run --session=current) and not require a command to run
The target is to implement (mecha)babs support for monitoring entire subject processing job script, so we could do smth like (expressing)
docstring for
attachwould tell user to usekillpotentially with specific signal (9 or INT) as to e.g. trigger killing without graceful shutdown which should happen on defaultkillwhich is TERM (15).and
attachwill just monitor current session (like we haverun --session=current) and not require a command to run