]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: fix race in signal interrupt during QEMU startup
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 29 Jul 2020 18:00:25 +0000 (19:00 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 7 Aug 2020 11:44:57 +0000 (12:44 +0100)
commit11188d5a196562395e824fc32a85b7719f0fad39
tree7ed7a790700694ecb4fec82664dcd8252dd4b00d
parent2998ba2012ea7997f2b233b2b81879fea3ee1b6a
qemu: fix race in signal interrupt during QEMU startup

If a Ctrl-C arrives while we are in the middle of executing the
virDomainCreateXML call, we will have no "virDomainPtr" object
available, but QEMU may none the less be running.

This means we'll never try to stop the QEMU process before we
honour the Ctrl-C and exit.

To deal with this race we need to postpone quit of the event
loop if it is requested while in the middle of domain startup.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_shim.c