Bug #3769

Implement SOCK_NONBLOCK flag to socket()

Added by Theo Schlossnagle over 4 years ago. Updated over 4 years ago.

Status:ResolvedStart date:2013-05-13
Priority:NormalDue date:
Assignee:Keith Wesolowski% Done:

100%

Category:kernel
Target version:-
Difficulty:Bite-size Tags:

Description

With the integration of 3666, the socket() implementation treats SOCK_NONBLOCK as a noop. This causes applications to believe the socket returned is in non-blocking more when it is not.

Implement the SOCK_NONBLOCK flag correctly. In addition, implement the SOCK_NDELAY flag to match accept4().

Return failure and set errno to EINVAL if unknown flags are passed in.

History

#1 Updated by Keith Wesolowski over 4 years ago

A more complete test suite that finds existing problems including the related socketpair issues may be found at https://gist.github.com/wesolows/5572455.

#2 Updated by Rich Lowe over 4 years ago

  • Tags deleted (needs-triage)
  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

Resolved in a63a4ea

Also available in: Atom