aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 2e202ffb20..ad50f12edb 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1020,7 +1020,10 @@ static void do_info_cpu_stats(Monitor *mon)
*/
static int do_quit(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
- exit(0);
+ monitor_suspend(mon);
+ no_shutdown = 0;
+ qemu_system_shutdown_request();
+
return 0;
}