[PATCH v2] Log alarms should be generated even if the QEMU process is not stopped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
---
v1:https://www.mail-archive.com/libvir-list@xxxxxxxxxx/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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux