mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-02 19:45:46 +00:00
vmm: Move the tty setting to the VM start routine
We want to shrink the control loop to a bare minimal. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
2e9d815701
commit
e6ef9ece2c
@ -851,13 +851,6 @@ impl Vm {
|
|||||||
let mut events = vec![epoll::Event::new(epoll::Events::empty(), 0); EPOLL_EVENTS_LEN];
|
let mut events = vec![epoll::Event::new(epoll::Events::empty(), 0); EPOLL_EVENTS_LEN];
|
||||||
let epoll_fd = self.epoll.as_raw_fd();
|
let epoll_fd = self.epoll.as_raw_fd();
|
||||||
|
|
||||||
if self.devices.console().input_enabled() && self.on_tty {
|
|
||||||
io::stdin()
|
|
||||||
.lock()
|
|
||||||
.set_raw_mode()
|
|
||||||
.map_err(Error::SetTerminalRaw)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
let exit_behaviour;
|
let exit_behaviour;
|
||||||
|
|
||||||
'outer: loop {
|
'outer: loop {
|
||||||
@ -1044,7 +1037,15 @@ impl Vm {
|
|||||||
}
|
}
|
||||||
Err(e) => error!("Signal not found {}", e),
|
Err(e) => error!("Signal not found {}", e),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.on_tty {
|
||||||
|
io::stdin()
|
||||||
|
.lock()
|
||||||
|
.set_raw_mode()
|
||||||
|
.map_err(Error::SetTerminalRaw)?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.control_loop()
|
self.control_loop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user