[libvirt] [PATCH 06/20] qemu_capabilities: Stop QEMU process before freeing

Ján Tomko jtomko at redhat.com
Tue Feb 19 15:00:39 UTC 2019


On Tue, Feb 19, 2019 at 10:04:49AM +0100, Jiri Denemark wrote:
>From: Chris Venteicher <cventeic at redhat.com>
>
>virQEMUCapsInitQMP now stops QEMU process in all execution paths,
>before freeing the process structure.
>
>The qemuProcessQMPStop function can be called multiple times without
>problems... Won't attempt to stop processes and free resources multiple
>times.
>
>Follow the convention established in qemu_process of
>1) alloc process structure
>2) start process
>3) use process
>4) stop process
>5) free process data structure
>
>The process data structure persists after the process activation fails
>or the process dies or is killed so stderr strings can be retrieved
>until the process data structure is freed.
>
>Signed-off-by: Chris Venteicher <cventeic at redhat.com>
>Reviewed-by: Jiri Denemark <jdenemar at redhat.com>
>Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
>---
>
>Notes:
>    Version 7:
>    - no change
>
> src/qemu/qemu_capabilities.c |  1 +
> src/qemu/qemu_process.c      | 24 ++++++++++++++++--------
> 2 files changed, 17 insertions(+), 8 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190219/1c9c927a/attachment-0001.sig>


More information about the libvir-list mailing list