From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLcpU-0002wm-UD for qemu-devel@nongnu.org; Wed, 23 Jul 2008 07:48:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLcpT-0002vl-9m for qemu-devel@nongnu.org; Wed, 23 Jul 2008 07:48:24 -0400 Received: from [199.232.76.173] (port=45398 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLcpT-0002vi-7B for qemu-devel@nongnu.org; Wed, 23 Jul 2008 07:48:23 -0400 Received: from mx1.redhat.com ([66.187.233.31]:55129) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLcpS-0004P0-Pz for qemu-devel@nongnu.org; Wed, 23 Jul 2008 07:48:23 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6NBmHrM012387 for ; Wed, 23 Jul 2008 07:48:17 -0400 Message-ID: <48871A7E.5030501@redhat.com> Date: Wed, 23 Jul 2008 13:48:14 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd. References: <488688E3.105@codemonkey.ws> <20080723082413.GA2291@redhat.com> In-Reply-To: <20080723082413.GA2291@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Daniel P. Berrange wrote: > In the case of the PTY backend, the only time I'd expect data to be dropped > is if there was no active slave open. If an application has the PTY open > and is interacting, then I'd want to get all data. Yep, that would be most useful (and also matches what is done for tcp for example). Now the interesting question is: How can qemu figure (in a portable way) whenever there is some process listening on the slave side? > My use case is that all VMs started will have a serial port configured > with '-serial pty'. The guest OS should not be blocked when writing to > the serial port if no one has the PTY open on the host, but if someone > attaches to it with 'virsh console' then I want to be guartenteed to > get all data. /me too. cheers, Gerd -- http://kraxel.fedorapeople.org/xenner/