# HG changeset patch # User mas01cr # Date 1191493053 0 # Node ID e6cdee24d6c38711c1a70137aac60eaafe84c0f5 # Parent 3720f5a78f6e3b265d489b606ddd98d6c8510da0 Improve exit handling when we have a server background process. Arrange the exit to kill off the most recently started background process, if we have at least one such. diff -r 3720f5a78f6e -r e6cdee24d6c3 tests/test-utils.sh --- a/tests/test-utils.sh Thu Oct 04 09:48:44 2007 +0000 +++ b/tests/test-utils.sh Thu Oct 04 10:17:33 2007 +0000 @@ -1,5 +1,7 @@ # no shebang line: this file should be sourced by run-test.sh files +set -E + trap "exit 1" ERR if [ -z ${AUDIODB} ]; then @@ -53,6 +55,7 @@ $1 -s $2 & # HACK: deal with race on process creation sleep 1 + trap 'kill $!; exit 1' ERR } stop_server() {