Unverified Commit 3b2ae9c1 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Alternative sleep function

parent 5fdff4b2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ _QEMU_SHUTDOWN_COUNTER=/run/qemu.counter
rm -f "${_QEMU_PID}"
rm -f "${_QEMU_SHUTDOWN_COUNTER}"

# Allows for troubleshooting signals sent to the process
_trap(){
    func="$1" ; shift
    for sig ; do
@@ -20,6 +19,13 @@ _trap(){
    done
}

snore()
{
    local IFS
    [[ -n "${_snore_fd:-}" ]] || exec {_snore_fd}<> <(:)
    read ${1:+-t "$1"} -u $_snore_fd || :
}

_graceful_shutdown(){

  local QEMU_MONPORT="${QEMU_MONPORT:-7100}"