"recv" and "recvfrom" on blocking sockets

Karr, David david.karr@cacheflow.com
Mon Sep 24 13:09:00 GMT 2001


I've checked the FAQ, the User Guide, and the mail archives, and I didn't
see anything that addresses this.

I have a little client/server application pair that uses pthreads to create
two threads, one of which waits on "recv" and the other which waits on
"recvfrom".  This works fine when I run the server on RH Linux, and the
client on either Linux or Cygwin.

However, when I run the server on Cygwin, the "recv" call immediately fails
with "Invalid argument", and the "recvfrom" immediately gets "Interrupted
system call".  If the latter is normal behavior, I could code an
EINTR-checking loop, but I have a feeling something else is wrong here.

I also noticed that if I want to build a code/make system that is portable
between the two, on Cygwin I have to create a local archive named "pthread"
that is an empty archive.  I can accept this.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list