mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Add a VM stop method
In order to transfer the control loop to a separate VMM thread, we want to shrink the VM control loop to a bare minimum. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
@@ -909,6 +909,10 @@ impl Vm {
|
||||
}
|
||||
}
|
||||
|
||||
Ok(exit_behaviour)
|
||||
}
|
||||
|
||||
pub fn stop(&mut self) -> Result<()> {
|
||||
if self.on_tty {
|
||||
// Don't forget to set the terminal in canonical mode
|
||||
// before to exit.
|
||||
@@ -941,7 +945,7 @@ impl Vm {
|
||||
thread.join().map_err(|_| Error::ThreadCleanup)?
|
||||
}
|
||||
|
||||
Ok(exit_behaviour)
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn os_signal_handler(signals: Signals, console_input_clone: Arc<Console>) {
|
||||
|
||||
Reference in New Issue
Block a user