summaryrefslogtreecommitdiff
path: root/build-vm
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2017-01-12 15:26:15 +0100
committerMichael Schroeder <mls@suse.de>2017-01-12 15:26:50 +0100
commit4a80d8543ede6469a67f2c2f1f18bf087600871f (patch)
tree19c8e43ae17a123fa64288c7bf24ee38987e123a /build-vm
parentb5c1826e701d0c5de5337660eab51f2227d8a060 (diff)
Use vm_kill to kill the build if the watchdog triggers
Diffstat (limited to 'build-vm')
-rw-r--r--build-vm11
1 files changed, 6 insertions, 5 deletions
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
}