Fix bug where we crash if our non -9 kill fails.

BUG=chromium-os:19154
TEST=Ran cros_stop_vm

Change-Id: I7150481649086e535469009c207c6fee7bb1990c
Reviewed-on: http://gerrit.chromium.org/gerrit/5972
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
This commit is contained in:
Chris Sosa 2011-08-14 17:44:02 -07:00
parent 892e6acdc0
commit e8ff2e848e

View File

@ -128,7 +128,7 @@ function stop_kvm() {
echo "Stopping the KVM instance" >&2
local pid=$(get_pid)
if [ -n "${pid}" ]; then
blocking_kill ${pid} 1 16 || blocking_kill 9 1
blocking_kill ${pid} 1 16 || blocking_kill ${pid} 9 1
sudo rm "${KVM_PID_FILE}"
else
echo "No kvm pid found to stop." >&2