qemu: make sure capability probing process can start

When daemon is killed right in the middle of probing a qemu binary for
its capabilities, the qemu process is left running.  Next time the
daemon is starting, it cannot start the probing qemu process because the
one that's already running does have the pidfile flock()'d.

Reported-by: Wang Yufei <james.wangyufei@huawei.com>

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2014-10-09 08:18:33 +02:00
parent d1fd086eb4
commit 0ed1b55b20

View File

@ -3243,6 +3243,8 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
config.data.nix.path = monpath;
config.data.nix.listen = false;
virPidFileForceCleanupPath(pidfile);
VIR_DEBUG("Try to get caps via QMP qemuCaps=%p", qemuCaps);
/*