It works always for stream sockets and does not at all (even with shutdown, even using poll(2) or read(2) instead of select) for dgram sockets. What domain (inet, local) are your sockets in? What typ
select should work for any type of socket. Its based on the type of file descriptor not whether it is stream/dgram. man recvmsg - recvmsg() may be used to receive data on a socket whether it is in a
You will find poll works as you desire but select does not. I recommend porting to poll anyway; select sucks bad. You might even try out epoll in 2.6. Thanks Good luck
Alex Riesen wrote: On linux-kernel, Nick Palmer wrote: The application expects that a close call on a socket that another thread is blocking in select and/or recvmsg on will cause select and/or recvm
Agreed, but as Alex Riesen has shown with his test case, the behavior differs based on the type of socket. This doesn't seem quite right, but was not my original point. other thread? Only if SO_LINGE