From 4a80d8543ede6469a67f2c2f1f18bf087600871f Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Thu, 12 Jan 2017 15:26:15 +0100 Subject: Use vm_kill to kill the build if the watchdog triggers --- build-vm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'build-vm') diff --git a/build-vm b/build-vm index c698c33..1433b04 100644 --- a/build-vm +++ b/build-vm @@ -410,6 +410,7 @@ background_monitor_process() { background_watchdog() { WATCHDOG_START= WATCHDOG_TIMEOUT=300 + BUILD_OPTIONS_PARSED= while sleep 5 ; do WATCH=`grep -a "### VM INTERACTION" "$LOGFILE" | tail -n 1` case $WATCH in @@ -421,11 +422,11 @@ background_watchdog() { ELAPSED=$((NOW-WATCHDOG_START)) if test $ELAPSED -gt $WATCHDOG_TIMEOUT ; then # kill the VM - echo "### WATCHDOG TRIGGERED, KILLING VM ###" - fuser -k -TERM "$VM_IMAGE" - exit 0 - fi - fi + echo "### WATCHDOG TRIGGERED, KILLING VM ###" + vm_kill + exit 0 + fi + fi done } -- cgit v1.2.3