From: Daniel P. Berrange Date: Thu, 27 Sep 2012 09:07:03 +0000 (+0100) Subject: Don't ignore return value of qemuProcessKill X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f1b4021b38f9485c50d386af6f682ecfc8025af5;p=libvirt.git Don't ignore return value of qemuProcessKill When calling qemuProcessKill from the virDomainDestroy impl in QEMU, do not ignore the return value. This ensures that if QEMU fails to respond to SIGKILL, the caller will know about the failure. Signed-off-by: Daniel P. Berrange --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7ac53aca4d..eb61a96426 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2012,7 +2012,11 @@ qemuDomainDestroyFlags(virDomainPtr dom, goto cleanup; } } else { - ignore_value(qemuProcessKill(driver, vm, VIR_QEMU_PROCESS_KILL_FORCE)); + if (qemuProcessKill(driver, vm, VIR_QEMU_PROCESS_KILL_FORCE) < 0) { + virReportError(VIR_ERR_OPERATION_FAILED, "%s", + _("failed to kill qemu process with SIGTERM")); + goto cleanup; + } } /* We need to prevent monitor EOF callback from doing our work (and sending