mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-12-23 06:15:46 +00:00
fix: Kill QEMU after 5 seconds if it hangs (#1088)
This commit is contained in:
@@ -41,7 +41,7 @@ finish() {
|
|||||||
if [ -s "$QEMU_PID" ]; then
|
if [ -s "$QEMU_PID" ]; then
|
||||||
|
|
||||||
pid=$(<"$QEMU_PID")
|
pid=$(<"$QEMU_PID")
|
||||||
echo && error "Forcefully terminating QEMU process, reason: $reason..."
|
echo && error "Forcefully terminating Virtual DSM, reason: $reason..."
|
||||||
{ kill -15 "$pid" || true; } 2>/dev/null
|
{ kill -15 "$pid" || true; } 2>/dev/null
|
||||||
|
|
||||||
while isAlive "$pid"; do
|
while isAlive "$pid"; do
|
||||||
@@ -53,7 +53,7 @@ finish() {
|
|||||||
[ ! -s "$QEMU_PID" ] && break
|
[ ! -s "$QEMU_PID" ] && break
|
||||||
|
|
||||||
if [ "$cnt" == "5" ]; then
|
if [ "$cnt" == "5" ]; then
|
||||||
error "QEMU did not terminate itself, forcefully killing process..."
|
echo && error "QEMU did not terminate itself, forcefully killing process..."
|
||||||
{ kill -9 "$pid" || true; } 2>/dev/null
|
{ kill -9 "$pid" || true; } 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user