Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 23 Sep 2004 01:16:22 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Blocking accept() broken? Message-ID: <20040923051622.GH9804@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <2da66eca04092222055f9bdc75 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2da66eca04092222055f9bdc75@mail.gmail.com> User-Agent: Mutt/1.4.1i On Thu, Sep 23, 2004 at 03:05:11PM +1000, Mailing List wrote: >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); Could you provide a simple, compilable/linkable, working test case? cgf -- 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/