Select() hangs forever

Vladislav Grinchenko vladislav.grinchenko@comtechmobile.com
Thu Apr 28 16:19:00 GMT 2005


Hi,

I encountered a strange problem porting a POSIX-compliant networking
library to cygwin:

A small test program creates a UNIX domain socket and listens on an
incoming connections. Then, from the same process, two ASYNC connections
are attempted (think of it as a loopback within a process). Calling
connect() on both returns "errno: 119 Operation now in progress" as
expected. 

Then, to complete the connection establishment, I call select() on both
FDs with Read/Write mask checked to see if in fact the connection is
completed. The timeout is set to 1 seconds (I also tried different
timeouts). The select() BLOCKS FOREVER and never returns (until I kill
the process). 

I ran the program with 'strace' and attached the relevant log file. Can
someone with working knowledge of cygwin networking code shed some light
of what I might be doing wrong?

Thanks in advance,
-Vlad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace.log
Type: application/octet-stream
Size: 6817 bytes
Desc: strace.log
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050428/45f1cf3d/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list