Subject: kern/26950: O_NONBLOCK is inherited across accept() yet fcntl(, F_GETFL) doesn't know it
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <email@example.com>
Date: 09/14/2004 20:50:33
>Synopsis: O_NONBLOCK is inherited across accept() yet fcntl(, F_GETFL) doesn't know it
>Arrival-Date: Tue Sep 14 20:51:00 UTC 2004
>Originator: Joe Orton
>Release: NetBSD 1.6
NetBSD spe143.testdrive.hp.com 1.6 NetBSD 1.6 (GENERIC) #0: Sun Sep 8 19:43:40 UTC 2002 firstname.lastname@example.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC i386
Compile this test case:
the program reports on NetBSD that O_NONBLOCK is not inherited across accept(), which does not appear to be the case. If you add a read() from the accepted socket, it will fail with EAGAIN.
fcntl(, F_GETFL) appears to be lying about the socket flags.