Re: poll() behaves differently in Linux 2.4.1 vs. Linux 2.2.14 (POLLHUP)

Henning P. Schmiedehausen (hps@tanstaafl.de)
Wed, 14 Mar 2001 08:12:06 +0000 (UTC)


davem@redhat.com (David S. Miller) writes:

>Jeffrey Butler writes:
> > I've noticed that poll() calls on IPv4 sockets do
> > not behave the same under linux 2.4 vs. linux 2.2.14.
> > Linux 2.4 will return POLLHUP for a socket that is not
> > connected (and has never been connected) while Linux
> > 2.2 will not.
> > The following example program demonstrates the
> > problem when it's run under linux 2.4:

>True, this behavior was changed from 2.2.x. We now match the behavior
>of other svr4 systems, in particular Solaris. This new behavior in
>2.4.x will not change.

Hi,

but Jeffrey wrote:

--- cut ---
JB> Other operating systems (not that they are necessarily
JB> correct) also output the same as Linux 2.2.14. I
JB> tried this on FreeBSD 4.4.1, Solaris 5.7 (on a SPARC),
JB> and Windows 2000 with Cygwin 1.1.7.
--- cut ---

This is BSD, SysVR4 and an abomination all behaving like 2.2.x and not
2.4.x (which confuses the heck out of a poll()-using daemon
here... :-) )

I'd prefer not to have too many user space surprises in moving from
2.2 to 2.4.

Regards
Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de D-91054 Buckenhof Fax.: 09131 / 50654-20 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/