From a7ec17b08fe94ee01559ed5f86fef265b0bf3f91 Mon Sep 17 00:00:00 2001 From: Scott Coulton Date: Mon, 19 Feb 2018 11:53:13 +1100 Subject: [PATCH] Added a fail if the user sets detached to true when qemu is running locally --- src/cmd/linuxkit/run_qemu.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cmd/linuxkit/run_qemu.go b/src/cmd/linuxkit/run_qemu.go index 2ea09a4f0..3f325b047 100644 --- a/src/cmd/linuxkit/run_qemu.go +++ b/src/cmd/linuxkit/run_qemu.go @@ -366,6 +366,11 @@ func runQemuLocal(config QemuConfig) error { } } + // Detached mode is only supported in a container. + if config.Detached == true { + return fmt.Errorf("Detached mode is only supported when running in a container, not locally") + } + qemuCmd := exec.Command(config.QemuBinPath, args...) // If verbosity is enabled print out the full path/arguments log.Debugf("%v\n", qemuCmd.Args)