mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-23 16:31:16 +00:00
Given the virtio-console is now able to buffer its output when no PTY is connected on the other end, the device manager code is updated to enable this. Moving the endpoint type from FilePair to PtyPair enables the proper codepath in the virtio-console implementation, as well as updating the PTY resize code, and forcing the PTY to always be non-blocking. The non-blocking behavior is required to avoid blocking the guest that would be waiting on the virtio-console driver. When receiving an EWOULDBLOCK error, the output will simply be redirected to the temporary buffer so that it can be later flushed. The PTY resize logic has been slightly modified to ensure the PTY file descriptors are closed. It avoids the child process to keep a hold onto the PTY device, which would have caused the PTY to believe something is connected on the other end, which would have prevented the detection of any new connection on the PTY. Fixes #4521 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |