From owner-freebsd-net@FreeBSD.ORG Fri Sep 2 11:04:41 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 CD9CD106566B; Fri, 2 Sep 2011 11:04:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E7CA28FC12; Fri, 2 Sep 2011 11:04:39 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA18037; Fri, 02 Sep 2011 14:04:37 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QzRY5-000Ee8-4F; Fri, 02 Sep 2011 14:04:37 +0300 Message-ID: <4E60B842.8050506@FreeBSD.org> Date: Fri, 02 Sep 2011 14:04:34 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0) Gecko/20110830 Thunderbird/6.0 MIME-Version: 1.0 To: Jilles Tjoelker References: <4E60A1B8.7080607@FreeBSD.org> <20110902104018.GA12845@stack.nl> In-Reply-To: <20110902104018.GA12845@stack.nl> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@FreeBSD.org, freebsd-standards@FreeBSD.org 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:04:41 -0000 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. -- Andriy Gapon