Skip to content
Commit 817ef04d authored by Jan Kiszka's avatar Jan Kiszka Committed by Peter Maydell
Browse files

Make qemu_shutdown_requested signal-safe



qemu_shutdown_requested may be interrupted by qemu_system_killed. If the
latter sets shutdown_requested after qemu_shutdown_requested has read it
but before it was cleared, the shutdown event is lost. Fix this by using
atomic_xchg.

This provides a different fix for the problem which commit 15124e14
attempts to deal with. That commit breaks use of ^C to drop into gdb,
and so this approach is better (and 15124e14 can be reverted).

Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: default avatarGonglei <arei.gonglei@huawei.com>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
[PMM: commit message tweak]
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent ff0d4876
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment