From: Martin Schwenke Date: Mon, 8 Oct 2018 02:39:30 +0000 (+1100) Subject: ctdb-tests: Improve signal handling trap X-Git-Tag: tdb-1.3.17~885 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa2ee4bea8d87f7095c97622b1382ef27e9105fb;p=thirdparty%2Fsamba.git ctdb-tests: Improve signal handling trap Interrupting a test run currently moves on to the next test. It should exit. Follow the practice of exiting with 128 + signal number. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/run_tests.sh b/ctdb/tests/run_tests.sh index dc9027df996..48fd0624f75 100755 --- a/ctdb/tests/run_tests.sh +++ b/ctdb/tests/run_tests.sh @@ -284,7 +284,8 @@ do_cleanup () fi } -trap do_cleanup SIGINT SIGTERM +trap "do_cleanup ; exit 130" SIGINT +trap "do_cleanup ; exit 143" SIGTERM declare -a tests i=0