From 951ad3495e77626c7c742ba17b15cd50cacbb886 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 8 Sep 2021 15:04:49 +0100 Subject: [PATCH] vmm: Only resize virtio-console when attached to TTY Fixes: #3092 Signed-off-by: Rob Bradford --- vmm/src/device_manager.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index eecb21923..e5510c85c 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -1755,7 +1755,12 @@ impl DeviceManager { .unwrap() .insert(id.clone(), device_node!(id, virtio_console_device)); - Ok(Some(console_resizer)) + // Only provide a resizer (for SIGWINCH handling) if the console is attached to the TTY + Ok(if matches!(console_config.mode, ConsoleOutputMode::Tty) { + Some(console_resizer) + } else { + None + }) } fn add_console_device(