fix: Trap exit code (#592)

This commit is contained in:
Kroese 2024-01-23 18:46:47 +01:00 committed by GitHub
parent fdbff4879b
commit 7790f81d15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,6 @@ terminal() {
_graceful_shutdown() { _graceful_shutdown() {
local cnt=0
local code=$? local code=$?
local pid url response local pid url response
@ -144,6 +143,8 @@ _graceful_shutdown() {
fi fi
local cnt=0
while [ "$cnt" -lt "$QEMU_TIMEOUT" ]; do while [ "$cnt" -lt "$QEMU_TIMEOUT" ]; do
! isAlive "$pid" && break ! isAlive "$pid" && break