mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 20:47:12 +01:00
feat: Preserve graceful shutdown for interactive console (#1876)
This commit is contained in:
+7
-1
@@ -53,13 +53,19 @@ if ! enabled "$SHUTDOWN"; then
|
||||
exec "${cmd[@]}" ${ARGS:+ $ARGS} >"$pipe" 2>&1
|
||||
fi
|
||||
|
||||
"${cmd[@]}" ${ARGS:+ $ARGS} >"$pipe" 2>&1 &
|
||||
if ! interactive; then
|
||||
"${cmd[@]}" ${ARGS:+ $ARGS} >"$pipe" 2>&1 &
|
||||
else
|
||||
startConsole "$pipe"
|
||||
setsid -w "${cmd[@]}" ${ARGS:+ $ARGS} </dev/null >"$pipe" 2>&1 &
|
||||
fi
|
||||
|
||||
pid=$!
|
||||
( sleep 30; boot ) &
|
||||
|
||||
rc=0
|
||||
wait "$pid" || rc=$?
|
||||
interactive && stopConsole
|
||||
wait "$output" || :
|
||||
|
||||
[ -f "$QEMU_END" ] && exit "$rc"
|
||||
|
||||
Reference in New Issue
Block a user