I have a signal socket to read from select (), but then no data comes in with recv call (), instead it returns -1 with errno == EAGAIN.
I can provide that no other thread touch the socket.
I think this is the wrong behavior. If a subsequent close occurs on the other hand, I can expect the return value to be 0 (graceful close) or another error code from recv, but not EAGAIN, because in my opinion, the data will come in the future.
I found several previous topics about the problem here , but without a solution.
This behavior happens to me on Ubuntu Linux Oneric or other recent Linux distributions, then the information from the published link here
The fact that it will be fixed in the kernel is not true for the kernel 3.0.0 or the latest 2.6.x
Does anyone have an idea why this is happening and how to avoid this unwanted behavior?
source
share