This is the mail archive of the
mailing list for the Cygwin project.
Re: Blocking accept() broken?
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 23 Sep 2004 01:16:22 -0400
- Subject: Re: Blocking accept() broken?
- References: <firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
On Thu, Sep 23, 2004 at 03:05:11PM +1000, Mailing List wrote:
>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
>* 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);
Could you provide a simple, compilable/linkable, working test case?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html