aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Weickelt <richard@weickelt.de>2019-11-26 00:44:09 +0100
committerRichard Weickelt <richard@weickelt.de>2019-11-26 18:30:34 +0000
commitb45e0f46e3e06d0c80b6d7f95ed6756515b6299c (patch)
treefc9bfa24cf9b7c23a9aed1106193bd2698e5b8d6
parentf4ae3b0642fb2f48d3516b734c326ee3c028ae30 (diff)
Kill the keep-alive background process
The sleep command in background was not killed although its parent process was. That caused builds on Travis to idle for up to 590s after completion in worst-case. This patch extends the EXIT trap and ensures that the sleep command is killed. There is unfortunately no generic way in Bash to achieve that (without writing lots of convoluted code) because utilities like pkill are not available in Git Bash. Change-Id: Ibbb5683e57c242e58133c1860ec9c921b7e449b7 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rwxr-xr-xscripts/build-qbs-with-qbs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build-qbs-with-qbs.sh b/scripts/build-qbs-with-qbs.sh
index b4f0643c5..f392ad405 100755
--- a/scripts/build-qbs-with-qbs.sh
+++ b/scripts/build-qbs-with-qbs.sh
@@ -113,5 +113,5 @@ fi
# timeout on Travis CI.
#
(while true; do echo "" && sleep 590; done) &
-trap "kill $!" EXIT
+trap "kill $!; wait $! 2>/dev/null || true; killall sleep || true" EXIT
qbs build -p "autotest-runner" ${BUILD_OPTIONS}