From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLgJX-0004xT-DX for qemu-devel@nongnu.org; Wed, 23 Jul 2008 11:31:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLgJW-0004xC-Pg for qemu-devel@nongnu.org; Wed, 23 Jul 2008 11:31:39 -0400 Received: from [199.232.76.173] (port=36629 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLgJW-0004x9-NB for qemu-devel@nongnu.org; Wed, 23 Jul 2008 11:31:38 -0400 Received: from mx1.redhat.com ([66.187.233.31]:35036) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLgJV-0004ZT-Vo for qemu-devel@nongnu.org; Wed, 23 Jul 2008 11:31:38 -0400 Date: Wed, 23 Jul 2008 16:31:33 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd. Message-ID: <20080723153133.GL2291@redhat.com> References: <488688E3.105@codemonkey.ws> <20080723082413.GA2291@redhat.com> <48871A7E.5030501@redhat.com> <20080723121510.GJ2291@redhat.com> <48872979.4050107@redhat.com> <48873F17.4030101@redhat.com> <48874D4A.8000604@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48874D4A.8000604@codemonkey.ws> Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Wed, Jul 23, 2008 at 10:24:58AM -0500, Anthony Liguori wrote: > Gerd Hoffmann wrote: > > > >>Which means we need our own code for ptys and can't use the generic fd > >>functions. I'll go trying cooking up a patch ... > > > >Comments on this one? > > > > Checking every 100ms for every pty device really makes me cringe. > > Why is libvirt using ptys in the first place? Why not use unix > sockets? They don't have these problems with state tracking. The application using libvirt chooses to use PTYs - we're merely exposing the capability. The virt-console program for interacting with serial ports uses PTYs because its a configuration that historically works with both Xen and KVM. It could equally use UNIX sockets, but it'd still be desirable for PTYs to work better Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|