mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
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:
parent
892e6acdc0
commit
e8ff2e848e
@ -128,7 +128,7 @@ function stop_kvm() {
|
|||||||
echo "Stopping the KVM instance" >&2
|
echo "Stopping the KVM instance" >&2
|
||||||
local pid=$(get_pid)
|
local pid=$(get_pid)
|
||||||
if [ -n "${pid}" ]; then
|
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}"
|
sudo rm "${KVM_PID_FILE}"
|
||||||
else
|
else
|
||||||
echo "No kvm pid found to stop." >&2
|
echo "No kvm pid found to stop." >&2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user