From 74c99243665ac9ecda5362c48293cbab4192ca5a Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sat, 21 Feb 2015 00:58:49 +0100 Subject: [PATCH] run-in-simulavr.sh: make stopping on "stop" working again. It was so far unnoticed that the "simulavr" program is only a script when run from within the build directory. Still killing it by name worked, because bash's exec didn't terminate the initiating script. Apparently this week Ubuntu updated bash and the new version now terminates the initiating script (which is a good idea), but now the executable to kill by name has a different name. It's prefixed with "lt-". As this "lt-" is hardcoded we can rely on it. --- testcases/run-in-simulavr.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testcases/run-in-simulavr.sh b/testcases/run-in-simulavr.sh index 6975d2d..839a00b 100755 --- a/testcases/run-in-simulavr.sh +++ b/testcases/run-in-simulavr.sh @@ -91,8 +91,9 @@ for GCODE_FILE in $*; do echo "${LINE}" case "${LINE}" in stop) - echo "Got \"stop\", killing ${SIMULAVR}." - kill -INT $(pidof -x "${SIMULAVR}") + echo "Got \"stop\", killing $(basename ${SIMULAVR})." + killall -INT $(basename "${SIMULAVR}") 2> /dev/null || \ + killall -INT "lt-"$(basename "${SIMULAVR}") ;; esac done