While there are a number of uses in the code-base of the exit(0) pattern it gets in the way of clean exit which can do all of it's house-keeping. In particular it was reported that you can crash plugins this way because TCG can still be running on other threads when the atexit callback is called. Use qmp_quit() instead which takes care of some housekeeping before triggering the shutdown. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reported-by: Lukas Jünger <lukas.junger@greensocs.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20211026102234.3961636-19-alex.bennee@linaro.org> |
||
|---|---|---|
| .. | ||
| bdrv-next-monitor-owned.c | ||
| blk-commit-all.c | ||
| blk-exp-close-all.c | ||
| blockdev-close-all-bdrv-states.c | ||
| change-state-handler.c | ||
| cmos.c | ||
| cpu-get-clock.c | ||
| cpu-synchronize-state.c | ||
| cpus-get-virtual-clock.c | ||
| dump.c | ||
| error-printf.c | ||
| fdset.c | ||
| fw_cfg.c | ||
| gdbstub.c | ||
| get-vm-name.c | ||
| icount.c | ||
| io_uring.c | ||
| iothread-lock.c | ||
| is-daemonized.c | ||
| isa-bus.c | ||
| linux-aio.c | ||
| meson.build | ||
| migr-blocker.c | ||
| module-opts.c | ||
| monitor-core.c | ||
| monitor.c | ||
| pci-bus.c | ||
| qdev.c | ||
| qemu-timer-notify-cb.c | ||
| qmp-command-available.c | ||
| qmp-quit.c | ||
| qmp_memory_device.c | ||
| qtest.c | ||
| ram-block.c | ||
| ramfb.c | ||
| replay-tools.c | ||
| replay.c | ||
| runstate-check.c | ||
| semihost.c | ||
| sysbus.c | ||
| target-get-monitor-def.c | ||
| target-monitor-defs.c | ||
| trace-control.c | ||
| usb-dev-stub.c | ||
| uuid.c | ||
| vm-stop.c | ||
| vmgenid.c | ||
| vmstate.c | ||
| win32-kbd-hook.c | ||
| xen-hw-stub.c | ||