Monitor: Return before exiting with 'quit'
This is a new version of the (now reverted) following commit: 0e8d2b55 The 'quit' Monitor command (implemented by do_quit()) calls exit() directly, this is problematic under QMP because QEMU exits before having a chance to send the ok response. Clients don't know if QEMU exited because of a problem or because the 'quit' command has been executed. This commit fixes that by making do_quit() use qemu_system_shutdown_request(), so that we exit gracefully. Thanks to Paolo Bonzini <firstname.lastname@example.org> for suggesting this solution. Signed-off-by: Luiz Capitulino <email@example.com>
Showing with 4 additions and 1 deletion