From owner-freebsd-net@FreeBSD.ORG Fri Sep 2 11:36:43 2011 Return-Path: Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD0B1106566B for ; Fri, 2 Sep 2011 11:36:43 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 4882E8FC13 for ; Fri, 2 Sep 2011 11:36:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id p82BLG6D024064; Fri, 2 Sep 2011 15:21:16 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id p82BLG1k024063; Fri, 2 Sep 2011 15:21:16 +0400 (MSK) (envelope-from ache) Date: Fri, 2 Sep 2011 15:21:16 +0400 From: Andrey Chernov To: Andriy Gapon Message-ID: <20110902112116.GA23835@vniz.net> Mail-Followup-To: Andrey Chernov , Andriy Gapon , Jilles Tjoelker , freebsd-net@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG References: <4E60A1B8.7080607@FreeBSD.org> <20110902104018.GA12845@stack.nl> <4E60B842.8050506@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E60B842.8050506@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG, Jilles Tjoelker Subject: Re: POLLHUP on never connected socket X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 11:36:43 -0000 On Fri, Sep 02, 2011 at 02:04:34PM +0300, Andriy Gapon wrote: > on 02/09/2011 13:40 Jilles Tjoelker said the following: > > Ports people have complained about poll() behaviour before, are there > > configure scripts that attempt to check if we ever return POLLHUP alone > > and only check for POLLIN if not? > > Not sure about that other software and how POLLIN is related here. > The software in question (mozilla nspr) checks for POLLNVAL, POLLERR, POLLPRI > and POLLOUT to determine if anything interesting has happened to a connection > supposed to be in progress. They aren't checking for POLLHUP at all and thus > they keep thinking that the connection is still in progress when they get it. It seems for such case it should return POLLERR too. -- http://ache.vniz.net/