mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
04f8c053cc
commit
0e8d2b5575
3 changed files with 22 additions and 1 deletions
2
sysemu.h
2
sysemu.h
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue