mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
Alternative sleep function
This commit is contained in:
parent
0e0f106493
commit
561e6cf130
@ -12,7 +12,6 @@ _QEMU_SHUTDOWN_COUNTER=/run/qemu.counter
|
|||||||
rm -f "${_QEMU_PID}"
|
rm -f "${_QEMU_PID}"
|
||||||
rm -f "${_QEMU_SHUTDOWN_COUNTER}"
|
rm -f "${_QEMU_SHUTDOWN_COUNTER}"
|
||||||
|
|
||||||
# Allows for troubleshooting signals sent to the process
|
|
||||||
_trap(){
|
_trap(){
|
||||||
func="$1" ; shift
|
func="$1" ; shift
|
||||||
for sig ; do
|
for sig ; do
|
||||||
@ -20,6 +19,13 @@ _trap(){
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
snore()
|
||||||
|
{
|
||||||
|
local IFS
|
||||||
|
[[ -n "${_snore_fd:-}" ]] || exec {_snore_fd}<> <(:)
|
||||||
|
read ${1:+-t "$1"} -u $_snore_fd || :
|
||||||
|
}
|
||||||
|
|
||||||
_graceful_shutdown(){
|
_graceful_shutdown(){
|
||||||
|
|
||||||
local QEMU_MONPORT="${QEMU_MONPORT:-7100}"
|
local QEMU_MONPORT="${QEMU_MONPORT:-7100}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user