Luiz Capitulino <lcapitul...@redhat.com> writes: > 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.
Yes, that needs fixing. > This commit fixes that by moving the exit() call to the main > loop, so that do_quit() requests the system to quit, instead > of calling exit() directly. Matches how system_reset and system_powerdown work. Looks good to me.