[haiku-bugs] Re: [Haiku] #2963: select() doesn't wait after non-blocking connect()

  • From: "hamish" <trac@xxxxxxxxxxxx>
  • Date: Sat, 30 May 2015 16:08:04 -0000

#2963: select() doesn't wait after non-blocking connect()
--------------------------------------+----------------------------
Reporter: bonefish | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: Network & Internet/TCP | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
--------------------------------------+----------------------------

Comment (by hamish):

The second patch fixes the issue. Attaching here in case anyone wants to
review. The first patch just fixes a small TODO for `B_SELECT_ERROR`.

I have half a mind to also change `TCPEndpoint::SendData` so it waits for
the connection to establish (or returns B_WOULD_BLOCK) before putting any
data into the queue, as this would make it consistent with the
`B_SELECT_WRITE` notification. This is how Linux behaves. FreeBSD will
happily queue data for sending before the connection is established
though. Thoughts?

--
Ticket URL: <https://dev.haiku-os.org/ticket/2963#comment:6>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: