From 425841a4fe14c2cf741491ec3082dac464a000b3 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 28 May 2019 19:44:07 +0100 Subject: [PATCH] vm: Do not explictly exit on reset Instead return from the control_loop() and calling function cleanly. This is helpful for the testing framework as that means we can launch multiple VMs in a row. Signed-off-by: Rob Bradford --- vmm/src/vm.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index 17ad7ebc5..90a545f90 100755 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -691,10 +691,7 @@ impl<'a> Vm<'a> { .set_canon_mode() .map_err(Error::SetTerminalCanon)?; - // Safe because we're terminating the process anyway. - unsafe { - libc::_exit(0); - } + return Ok(()); } EpollDispatch::Stdin => { let mut out = [0u8; 64];