Skip to content

Commit e508394

Browse files
committed
Start QEMU binary as a background process
Signed-off-by: Arthur Sengileyev <[email protected]>
1 parent 01af6f9 commit e508394

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hack/test-templates.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,7 @@ if [[ -n ${CHECKS["restart"]} ]]; then
414414
fi
415415

416416
INFO "Stopping \"$NAME\""
417-
# TODO https://github.com/lima-vm/lima/issues/3221
418-
limactl stop "$NAME" || [ "${OS_HOST}" = "Msys" ]
417+
limactl stop "$NAME"
419418
sleep 3
420419

421420
if [[ -n ${CHECKS["disk"]} ]]; then
@@ -529,8 +528,7 @@ if [[ $NAME == "fedora" && "$(limactl ls --json "$NAME" | jq -r .vmType)" == "vz
529528
fi
530529

531530
INFO "Stopping \"$NAME\""
532-
# TODO https://github.com/lima-vm/lima/issues/3221
533-
limactl stop "$NAME" || [ "${OS_HOST}" = "Msys" ]
531+
limactl stop "$NAME"
534532
sleep 3
535533

536534
INFO "Deleting \"$NAME\""

pkg/qemu/qemu_driver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"github.com/digitalocean/go-qemu/qmp"
2525
"github.com/digitalocean/go-qemu/qmp/raw"
2626
"github.com/lima-vm/lima/pkg/driver"
27+
"github.com/lima-vm/lima/pkg/executil"
2728
"github.com/lima-vm/lima/pkg/limayaml"
2829
"github.com/lima-vm/lima/pkg/networks/usernet"
2930
"github.com/lima-vm/lima/pkg/store"
@@ -110,6 +111,7 @@ func (l *LimaQemuDriver) Start(ctx context.Context) (chan error, error) {
110111
}
111112
qCmd := exec.CommandContext(ctx, qExe, qArgsFinal...)
112113
qCmd.ExtraFiles = append(qCmd.ExtraFiles, applier.files...)
114+
qCmd.SysProcAttr = executil.BackgroundSysProcAttr
113115
qStdout, err := qCmd.StdoutPipe()
114116
if err != nil {
115117
return nil, err

0 commit comments

Comments
 (0)