From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KM2CR-0005d1-2i for qemu-devel@nongnu.org; Thu, 24 Jul 2008 10:53:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KM2CP-0005bD-0C for qemu-devel@nongnu.org; Thu, 24 Jul 2008 10:53:46 -0400 Received: from [199.232.76.173] (port=60276 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KM2CO-0005b7-Gy for qemu-devel@nongnu.org; Thu, 24 Jul 2008 10:53:44 -0400 Received: from mx1.redhat.com ([66.187.233.31]:58833) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KM2CO-0003Pc-Gj for qemu-devel@nongnu.org; Thu, 24 Jul 2008 10:53:44 -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 m6OErbuo004925 for ; Thu, 24 Jul 2008 10:53:37 -0400 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6OEra0C004501 for ; Thu, 24 Jul 2008 10:53:37 -0400 Received: from zweiblum.travel.kraxel.org (vpn-4-161.str.redhat.com [10.32.4.161]) by pobox.stuttgart.redhat.com (8.13.1/8.13.1) with ESMTP id m6OEraZj011304 for ; Thu, 24 Jul 2008 10:53:36 -0400 Message-ID: <48889765.9080709@redhat.com> Date: Thu, 24 Jul 2008 16:53:25 +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: <20080723082413.GA2291@redhat.com> <48871A7E.5030501@redhat.com> <20080723121510.GJ2291@redhat.com> <48872979.4050107@redhat.com> <48873F17.4030101@redhat.com> <48874D4A.8000604@codemonkey.ws> <48875849.60200@redhat.com> <48875CEE.6000906@codemonkey.ws> <20080724083553.GC1138@redhat.com> <4888905F.3030404@codemonkey.ws> <20080724150718.GA17248@shareable.org> In-Reply-To: <20080724150718.GA17248@shareable.org> 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: qemu-devel@nongnu.org Jamie Lokier wrote: > I'm surprised it works. You shouldn't be able to get any more > information out of epoll() than poll() - they're supposed to be > exactly equivalent informationally, except for details and performance. I was thinking just the same ... poll/epoll says the file handle is readable. It does that in two cases: (1) there is data to read (2) pty is unconnected and read() wants to give you an -EIO. And I think you can't keep those two cases apart using only the information given by poll/epoll ... cheers, Gerd -- http://kraxel.fedorapeople.org/xenner/