mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
a8fa2af64b
During vm_shutdown or vm_snapshot, all the console devices will be closed. When this happens stdout (FD #2) will also be closed as the console device using these FD is closed. If the VM were to be started later, FD#2 can be assigned to a different file. But pre_create_console_devices looks for FD#2 while opening tty device, which could point to any file. To avoid this problem, the STDOUT FD is duplicated when being assigned to a console device. Even if the console devices were to be closed, the duplicated FD will be closed and FD#2 will continue to point to STDOUT. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com> |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml |