diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-08-23 22:01:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-08-23 22:01:14 +0200 |
commit | cadd58c4f66fb861f51f11c30c28217e4362a5d5 (patch) | |
tree | 4094f52358491142064eb7fe64e2ab70c3f7a8c6 | |
parent | ad4b829e2feae6dc9aee2d5fe35cf9c6a3d09e6d (diff) | |
download | exchange-cadd58c4f66fb861f51f11c30c28217e4362a5d5.tar.gz exchange-cadd58c4f66fb861f51f11c30c28217e4362a5d5.tar.bz2 exchange-cadd58c4f66fb861f51f11c30c28217e4362a5d5.zip |
cleaner exiting
-rwxr-xr-x | src/auditor/setup.sh | 2 | ||||
-rwxr-xr-x | src/testing/taler-unified-setup.sh | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/auditor/setup.sh b/src/auditor/setup.sh index 87946b05c..eb8a784ee 100755 --- a/src/auditor/setup.sh +++ b/src/auditor/setup.sh @@ -17,7 +17,7 @@ function exit_cleanup() then echo "Killing taler-unified-setup ($SETUP_PID)" >&2 kill -TERM "$SETUP_PID" 2> /dev/null || true - wait + wait "$SETUP_PID" 2> /dev/null || true fi } diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index bb77ae37d..e57fbc30a 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -29,16 +29,20 @@ set -eu +EXIT_STATUS=2 + # Exit, with status code "skip" (no 'real' failure) function exit_skip() { echo " SKIP: " "$@" >&2 - exit 77 + EXIT_STATUS=77 + exit "$EXIT_STATUS" } # Exit, with error message (hard failure) function exit_fail() { echo " FAIL: " "$@" >&2 - exit 1 + EXIT_STATUS=1 + exit "$EXIT_STATUS" } # Cleanup to run whenever we exit @@ -52,6 +56,7 @@ function cleanup() done wait rm -f libeufin-nexus.pid libeufin-sandbox.pid + exit "$EXIT_STATUS" } # Install cleanup handler (except for kill -9) @@ -803,5 +808,5 @@ else fi echo "Taler unified setup terminating!" >&2 - -exit 0 +EXIT_STATUS=0 +exit "$EXIT_STATUS" |