I would like to know if the following scenario is real?!
- select() (RD) on non-blocking TCP socket says that the socket is ready
- following recv() would return EWOULDBLOCK despite the call to select()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am aware of an error in a popular desktop operating where
O_NONBLOCKTCP sockets, particularly those running over the loopback interface, can sometimes returnEAGAINfromrecv()afterselect()reports the socket is ready for reading. In my case, this happens after the other side half-closes the sending stream.For more details, see the source code for
t_nx.mlin the NX library of my OCaml Network Application Environment distribution. (link)