Blocking accept() broken?

Mailing List mailingster@gmail.com
Thu Sep 23 08:05:00 GMT 2004


G'day

In Linux, if I call accept(socket_fd, ....);  it will block until
there is a connection attempt to that socket.

In Cygwin, even after writing code to ensure it is blocking*, it acts
in a non-blocking manner.   I've looked around and can find no
explaination for this, so I'm just wondering if anyone has any
possible solution?

Thanks


* The code I used to force blocking was:
        
        /* Set our listen socket blocking */
	flags = fcntl(listenfd, F_GETFL, 0);
	flags = flags & ~FNDELAY;  /* Turn blocking on */
	fcntl(listenfd, F_SETFL, flags);

--
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