[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/4] qemu-char: add -chardev exit-on-eof opti
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/4] qemu-char: add -chardev exit-on-eof option |
Date: |
Mon, 28 Jul 2014 15:21:26 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/25/2014 07:16 AM, Stefan Hajnoczi wrote:
> When QEMU is executed as part of a test case or from a script, it is
> usually desirable to exit if the parent process terminates. This
> ensures that "leaked" QEMU processes do not continue consuming resources
> after their parent has died.
>
> This patch adds the -chardev exit-on-eof option causing socket and pipe
> chardevs to exit QEMU upon close. This happens when a parent process
> deliberately closes its file descriptor but also when the kernel cleans
> up a crashed process.
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> include/sysemu/char.h | 1 +
> qapi-schema.json | 23 ++++++++++++++++-------
> qemu-char.c | 33 +++++++++++++++++++++++++++------
> qemu-options.hx | 19 +++++++++++++------
> 4 files changed, 57 insertions(+), 19 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature