Re: Cross thread shutdown of connected UDP socket, unexpected recvfrom behavior

2013-11-10 Thread Richard Weinberger
On Sun, Nov 10, 2013 at 2:32 AM, mpb wrote: > Hi LKML, > > I have a C/pthreads program with two threads ("main" and "thread"). > "thread" calls recvfrom on a connected UDP socket and blocks, waiting > for input. "main" then calls shutdown SHUT_RD on the socket. In > "thread", recvfrom returns, a

Cross thread shutdown of connected UDP socket, unexpected recvfrom behavior

2013-11-09 Thread mpb
Hi LKML, I have a C/pthreads program with two threads ("main" and "thread"). "thread" calls recvfrom on a connected UDP socket and blocks, waiting for input. "main" then calls shutdown SHUT_RD on the socket. In "thread", recvfrom returns, apparently successfully, returning a zero length string,