From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBsMS-0002Fi-DR for qemu-devel@nongnu.org; Mon, 28 Jul 2014 17:21:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBsML-0004Ns-BN for qemu-devel@nongnu.org; Mon, 28 Jul 2014 17:21:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBsML-0004NY-1s for qemu-devel@nongnu.org; Mon, 28 Jul 2014 17:21:29 -0400 Message-ID: <53D6BED6.6070709@redhat.com> Date: Mon, 28 Jul 2014 15:21:26 -0600 From: Eric Blake MIME-Version: 1.0 References: <1406294206-26679-1-git-send-email-stefanha@redhat.com> <1406294206-26679-4-git-send-email-stefanha@redhat.com> In-Reply-To: <1406294206-26679-4-git-send-email-stefanha@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LQ9wHHSNwWPLWc2qbX40sVxOXJrpsCQLj" Subject: Re: [Qemu-devel] [PATCH v2 3/4] qemu-char: add -chardev exit-on-eof option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Peter Maydell , Andreas Faerber , Markus Armbruster This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LQ9wHHSNwWPLWc2qbX40sVxOXJrpsCQLj Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 resource= s > after their parent has died. >=20 > 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. >=20 > Signed-off-by: Stefan Hajnoczi > --- > 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --LQ9wHHSNwWPLWc2qbX40sVxOXJrpsCQLj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJT1r7WAAoJEKeha0olJ0NqhYcIAICgVZZqvTzzXHDqkODKCeky ACTYXoduMN5D4FPJDTcyf5gZ2nZYifQvE3DVRWP2ulde4TKV14eBl13ppQPSvW0k TCY3RBAgofJqpmqd7HN7Mt0+K/m8FRlxSx+e5wARc7BVZ+x792oonrn1P+g98Ug1 zhesfvyXlqCIgaNenhIHo1WAAH7oVjOqqnhWefM6qHaq1mLx8DdlieBQD0OIvS/H 78qrnIyWNOzy43nuysp/TXVL5ul968vy3BAOLfLkwUVRNZdF7cYBCf20W1sAZ0tm Hzxoflx7xfa0Xs0zJT5D22C3I17C5AK8daio6piQarjIkTRTbJMyLZI9cCupf3A= =7BHt -----END PGP SIGNATURE----- --LQ9wHHSNwWPLWc2qbX40sVxOXJrpsCQLj--