New: accept() doesn't wake with error when socket descriptor closed
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]/
Quoted 23 lines · On Fri, 12 Oct 2007 07:42:06 -0700 (PDT) [email protected] wrote:
http://bugzilla.kernel.org/show_bug.cgi?id=9149
Summary: accept() doesn't wake with error when socket descriptor closed Product: Networking Version: 2.5 KernelVersion: 2.6.18 Platform: All OS/Version: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: IPV4 AssignedTo: [email protected] ReportedBy: [email protected]Most recent kernel where this bug did not occur: no idea
Distribution: no idea - remote server
Hardware Environment: i686
Software Environment: no idea - probably pure console server
Quoted 7 lines
Problem Description:
In multithreaded process, one thread launchesaccept()on a valid-so-far listening socket file descriptor sockfd and waits on it. After this second thread launches close( sockfd ). First thread further waits onaccept()even though the descriptor is now invalid.accept()should wake up and return with -1 and errno EBADF.
I have a feeling this is an FAQ, but I forget what the answer is?