Monitor: Return before exiting with 'quit'
authorLuiz Capitulino <lcapitulino@redhat.com>
Tue, 6 Apr 2010 21:55:54 +0000 (18:55 -0300)
committerLuiz Capitulino <lcapitulino@redhat.com>
Mon, 26 Apr 2010 19:36:01 +0000 (16:36 -0300)
commit88a3332108717d56d48e492639b5ba0091c85e6f
treecd646883393e059e29c83e434a7cb9055d3441c3
parent2afc14f270372c519eda3799234d96d63d74fd8e
Monitor: Return before exiting with 'quit'

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 moving the exit() call to the main
loop, so that do_quit() requests the system to quit, instead
of calling exit() directly.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor.c
sysemu.h
vl.c