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

丁丽敏 posted 1 patch 1 year, 7 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
1 file changed, 5 insertions(+), 3 deletions(-)
[PATCH v2] Log alarms should be generated even if the QEMU process is not stopped
Posted by 丁丽敏 1 year, 7 months ago




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 &amp; VIR_QEMU_PROCESS_KILL_NOWAIT) {

-        virProcessKill(vm->pid,

-                       (flags &amp; VIR_QEMU_PROCESS_KILL_FORCE) ?

-                       SIGKILL : SIGTERM);

+        if (virProcessKill(vm->pid,

+                          (flags &amp; VIR_QEMU_PROCESS_KILL_FORCE) ?

+                          SIGKILL : SIGTERM);) {

+            VIR_DEBUG("Failed to terminate qemu process");

+        }

         return 0;

     }




-- 

2.18.4