From d69669a9538af1e3767d025769cbd7e776db49cb Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Wed, 7 Oct 2020 13:56:17 +0200 Subject: [PATCH] pmb.qemu.run: set serial to mon:stdio This makes QEMU trap signals like Ctrl-C and send it to the guest instead of terminating QEMU. To quit QEMU with this option you can use [Ctrl-A] [x] or [Ctrl-A] [c] and type 'quit' at the prompt. --- pmb/qemu/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmb/qemu/run.py b/pmb/qemu/run.py index 76f81064..d6bdb893 100644 --- a/pmb/qemu/run.py +++ b/pmb/qemu/run.py @@ -118,7 +118,7 @@ def command_qemu(args, arch, img_path): command += ["-smp", str(os.cpu_count())] command += ["-m", str(args.memory)] - command += ["-serial", "stdio"] + command += ["-serial", "mon:stdio"] command += ["-drive", "file=" + img_path + ",format=raw,if=virtio"] if args.qemu_tablet: command += ["-device", "virtio-tablet-pci"]