From e56ac441124a64a5533dc2e75d60e59f93adc8cc Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sat, 29 Aug 2020 20:47:30 +0200 Subject: [PATCH] New improved safeguard to kill -9 VICE if it doesn't terminate after 20 seconds --- 6502/C64/emulator/run-in-vice.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/6502/C64/emulator/run-in-vice.sh b/6502/C64/emulator/run-in-vice.sh index 6ef9ee8..5511aab 100755 --- a/6502/C64/emulator/run-in-vice.sh +++ b/6502/C64/emulator/run-in-vice.sh @@ -50,7 +50,11 @@ then done sleep 0.5 + kill9log="${basedir}/kill-9.log" + vicepid=$(jobs -p %1) kill %1 + (sleep 20; ps -q "${vicepid}" -f --no-headers && \ + (kill -9 "${vicepid}" ; date)) >> "${kill9log}" 2>&1 & fi wait %1 || echo "x64 returned $?"