From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rumhx-0004n6-SH for qemu-devel@nongnu.org; Tue, 07 Feb 2012 10:11:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rumhs-0004c6-1O for qemu-devel@nongnu.org; Tue, 07 Feb 2012 10:11:49 -0500 Received: from e9.ny.us.ibm.com ([32.97.182.139]:43483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rumhr-0004bw-Sy for qemu-devel@nongnu.org; Tue, 07 Feb 2012 10:11:44 -0500 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Feb 2012 10:11:42 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id EE7F06E827B for ; Tue, 7 Feb 2012 10:08:08 -0500 (EST) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q17F7rIO344508 for ; Tue, 7 Feb 2012 10:08:08 -0500 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q17F7Gb5018588 for ; Tue, 7 Feb 2012 08:07:16 -0700 Message-ID: <4F313E1E.3080003@us.ibm.com> Date: Tue, 07 Feb 2012 09:07:10 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1328623766-12287-1-git-send-email-armbru@redhat.com> <1328623766-12287-3-git-send-email-armbru@redhat.com> In-Reply-To: <1328623766-12287-3-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/19] qemu-char: Use qemu_open() to avoid leaking fds to children List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.org On 02/07/2012 08:09 AM, Markus Armbruster wrote: > Fixed silently in commit aad04cd0, but that just got reverted. > Re-apply the fixes, plus one missed instance: parport on Linux. > > Signed-off-by: Markus Armbruster Reviewed-by: Anthony Liguori Regards, Anthony Liguori > --- > qemu-char.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index 1e882cf..368df2e 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -665,7 +665,7 @@ static CharDriverState *qemu_chr_open_pipe(QemuOpts *opts) > close(fd_in); > if (fd_out>= 0) > close(fd_out); > - TFR(fd_in = fd_out = open(filename, O_RDWR | O_BINARY)); > + TFR(fd_in = fd_out = qemu_open(filename, O_RDWR | O_BINARY)); > if (fd_in< 0) > return NULL; > } > @@ -1217,7 +1217,7 @@ static CharDriverState *qemu_chr_open_tty(QemuOpts *opts) > CharDriverState *chr; > int fd; > > - TFR(fd = open(filename, O_RDWR | O_NONBLOCK)); > + TFR(fd = qemu_open(filename, O_RDWR | O_NONBLOCK)); > if (fd< 0) { > return NULL; > } > @@ -1355,7 +1355,7 @@ static CharDriverState *qemu_chr_open_pp(QemuOpts *opts) > ParallelCharDriver *drv; > int fd; > > - TFR(fd = open(filename, O_RDWR)); > + TFR(fd = qemu_open(filename, O_RDWR)); > if (fd< 0) > return NULL; > > @@ -1424,7 +1424,7 @@ static CharDriverState *qemu_chr_open_pp(QemuOpts *opts) > CharDriverState *chr; > int fd; > > - fd = open(filename, O_RDWR); > + fd = qemu_open(filename, O_RDWR); > if (fd< 0) > return NULL; >