From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KM4lz-00023F-PN for qemu-devel@nongnu.org; Thu, 24 Jul 2008 13:38:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KM4ly-00020p-4b for qemu-devel@nongnu.org; Thu, 24 Jul 2008 13:38:39 -0400 Received: from [199.232.76.173] (port=58589 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KM4lx-00020a-PA for qemu-devel@nongnu.org; Thu, 24 Jul 2008 13:38:37 -0400 Received: from py-out-1112.google.com ([64.233.166.177]:63290) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KM4lx-0007hM-Ku for qemu-devel@nongnu.org; Thu, 24 Jul 2008 13:38:37 -0400 Received: by py-out-1112.google.com with SMTP id p76so2188929pyb.10 for ; Thu, 24 Jul 2008 10:38:36 -0700 (PDT) Message-ID: <4888BDF6.3070208@codemonkey.ws> Date: Thu, 24 Jul 2008 12:37:58 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd. References: <48874D4A.8000604@codemonkey.ws> <48875849.60200@redhat.com> <200807231744.28969.paul@codesourcery.com> In-Reply-To: <200807231744.28969.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: qemu-devel@nongnu.org Cc: Gerd Hoffmann Paul Brook wrote: > On Wednesday 23 July 2008, Gerd Hoffmann wrote: > >> Anthony Liguori wrote: >> >>> Gerd Hoffmann wrote: >>> >>>> Comments on this one? >>>> >>> Checking every 100ms for every pty device really makes me cringe. >>> >> Only when unconnected, and the interval can be changed. >> And I'm certainly open for better ideas ... >> > > Anything that requires periodic polling is almost certainly wrong. > > If it's unconnected then why do we need to poll at all? If we're discarding > data then we aren't going to retry, so it should be sufficient to check > whenever we send data. > There's no way to determine if someone reconnected without trying to do a read(). pty's just aren't designed for this sort of thing. Regards, Anthony Liguori > Paul > > >