mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-23 08:21:15 +00:00
vmm: don't redundantly set the TTY to canon mode
If the VM is shut down, either it's going to be started again, in which case we still want to be in raw mode, or the process is about to exit, in which case canon mode will be set at the end of main. Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
parent
41880919a0
commit
520aff2efc
@ -141,9 +141,6 @@ pub enum Error {
|
|||||||
#[error("Cannot setup terminal in raw mode: {0}")]
|
#[error("Cannot setup terminal in raw mode: {0}")]
|
||||||
SetTerminalRaw(#[source] vmm_sys_util::errno::Error),
|
SetTerminalRaw(#[source] vmm_sys_util::errno::Error),
|
||||||
|
|
||||||
#[error("Cannot setup terminal in canonical mode.: {0}")]
|
|
||||||
SetTerminalCanon(#[source] vmm_sys_util::errno::Error),
|
|
||||||
|
|
||||||
#[error("Cannot spawn a signal handler thread: {0}")]
|
#[error("Cannot spawn a signal handler thread: {0}")]
|
||||||
SignalHandlerSpawn(#[source] io::Error),
|
SignalHandlerSpawn(#[source] io::Error),
|
||||||
|
|
||||||
@ -1205,15 +1202,6 @@ impl Vm {
|
|||||||
|
|
||||||
state.valid_transition(new_state)?;
|
state.valid_transition(new_state)?;
|
||||||
|
|
||||||
if self.on_tty {
|
|
||||||
// Don't forget to set the terminal in canonical mode
|
|
||||||
// before to exit.
|
|
||||||
io::stdin()
|
|
||||||
.lock()
|
|
||||||
.set_canon_mode()
|
|
||||||
.map_err(Error::SetTerminalCanon)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wake up the DeviceManager threads so they will get terminated cleanly
|
// Wake up the DeviceManager threads so they will get terminated cleanly
|
||||||
self.device_manager
|
self.device_manager
|
||||||
.lock()
|
.lock()
|
||||||
|
Loading…
Reference in New Issue
Block a user