If the qemu process is shutdown and flag is set to VIR_QEMU_PROCESS_KILL_NOWAIT,
a log alarm is generated even if the qemu process is not stopped.

Signed-off-by: dinglimin <dinglimin@cmss.chinamobile.com>
---
v1:https://www.mail-archive.com/libvir-list@redhat.com/msg232232.html
diff to v1:
- Add the patch 's description.
- Change the code format.
---

 src/qemu/qemu_process.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index cbfdd3bda5..d876e345a0 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8006,9 +8006,11 @@ qemuProcessKill(virDomainObj *vm, unsigned int flags)
     }

     if (flags & VIR_QEMU_PROCESS_KILL_NOWAIT) {
-        virProcessKill(vm->pid,
-                       (flags & VIR_QEMU_PROCESS_KILL_FORCE) ?
-                       SIGKILL : SIGTERM);
+        if (virProcessKill(vm->pid,
+                          (flags & VIR_QEMU_PROCESS_KILL_FORCE) ?
+                          SIGKILL : SIGTERM);) {
+            VIR_DEBUG("Failed to terminate qemu process");
+        }
         return 0;
     }

-- 
2.18.4