Date: Fri, 02 Sep 2011 15:59:55 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: Andrey Chernov <ache@FreeBSD.org>, Jilles Tjoelker <jilles@stack.nl>, freebsd-net@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: POLLHUP on never connected socket Message-ID: <4E60D34B.6050506@FreeBSD.org> In-Reply-To: <20110902112116.GA23835@vniz.net> References: <4E60A1B8.7080607@FreeBSD.org> <20110902104018.GA12845@stack.nl> <4E60B842.8050506@FreeBSD.org> <20110902112116.GA23835@vniz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
on 02/09/2011 14:21 Andrey Chernov said the following: > 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. > I think that I would agree as this is not a graceful disconnect / hang-up but an error in trying to connect. Anyway I am not an expert in this matters and I'd think that POLLHUP should be checked anyway - better safe than sorry. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E60D34B.6050506>