diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2010-04-06 18:55:54 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2010-04-26 16:36:01 -0300 |
commit | 0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d (patch) | |
tree | cd646883393e059e29c83e434a7cb9055d3441c3 /sysemu.h | |
parent | 04f8c053cca9c329eebb761f3a1ffef3d349b84c (diff) | |
download | qemu-0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d.tar.gz qemu-0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d.tar.bz2 qemu-0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d.zip |
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>
Diffstat (limited to 'sysemu.h')
-rw-r--r-- | sysemu.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -45,9 +45,11 @@ void cpu_disable_ticks(void); void qemu_system_reset_request(void); void qemu_system_shutdown_request(void); void qemu_system_powerdown_request(void); +void qemu_system_exit_request(void); int qemu_shutdown_requested(void); int qemu_reset_requested(void); int qemu_powerdown_requested(void); +int qemu_exit_requested(void); extern qemu_irq qemu_system_powerdown; void qemu_system_reset(void); |