mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-28 15:35:29 +00:00
5492259af9
When I refactored this to centralise resetting the tty into DeviceManager::drop, I tested that the tty was reset if an error happened on the vmm thread, but not on the main thread. It turns out that if an error happened on the main thread, the process would just exit, so drop handlers on other threads wouldn't get run. To fix this, I've changed start_vmm() to write to the VMM's exit eventfd and then join the thread if an error happens after the vmm thread is started. Fixes: b6feae0a ("vmm: only touch the tty flags if it's being used") Signed-off-by: Alyssa Ross <hi@alyssa.is>