Loading src/nsd-mantid-profile-wrap.sh +10 −2 Original line number Diff line number Diff line Loading @@ -84,9 +84,17 @@ echo "Writing script output to ${TMP}" trap 'set -x ; kill -HUP $pid' SIGINT trap 'set -x ; wait $pid' EXIT # execute profile process in foreground # execute profile process in background PTMP=$(mktemp) args=("$PROFILE_ENV" "--classic" "-m" "mantidprofiler") # shellcheck disable=SC2206 # do not break the array into a single string args+=(${PROFILE_OPT[@]}) args+=("${pid}") nsd-conda-wrap.sh "${args[@]}" && echo "Wrote ${PROFILE_OUT}" nsd-conda-wrap.sh "${args[@]}" > ${PTMP} & ppid=$i echo "Writing profile output to ${PTMP}" trap 'set -x ; kill -HUP $pid $ppid' SIGINT # follow output from main app and cleanup tail -f ${TMP} --pid $pid wait -n $ppid && echo "Wrote ${PROFILE_OUT}" trap - EXIT Loading
src/nsd-mantid-profile-wrap.sh +10 −2 Original line number Diff line number Diff line Loading @@ -84,9 +84,17 @@ echo "Writing script output to ${TMP}" trap 'set -x ; kill -HUP $pid' SIGINT trap 'set -x ; wait $pid' EXIT # execute profile process in foreground # execute profile process in background PTMP=$(mktemp) args=("$PROFILE_ENV" "--classic" "-m" "mantidprofiler") # shellcheck disable=SC2206 # do not break the array into a single string args+=(${PROFILE_OPT[@]}) args+=("${pid}") nsd-conda-wrap.sh "${args[@]}" && echo "Wrote ${PROFILE_OUT}" nsd-conda-wrap.sh "${args[@]}" > ${PTMP} & ppid=$i echo "Writing profile output to ${PTMP}" trap 'set -x ; kill -HUP $pid $ppid' SIGINT # follow output from main app and cleanup tail -f ${TMP} --pid $pid wait -n $ppid && echo "Wrote ${PROFILE_OUT}" trap - EXIT