Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: Chris Faylor Date: Mon, 19 Jun 2000 20:11:47 -0400 To: cygwin AT sourceware DOT cygnus DOT com Subject: Re: select() implementation question Message-ID: <20000619201147.A936@cygnus.com> Reply-To: cygwin AT sourceware DOT cygnus DOT com Mail-Followup-To: cygwin AT sourceware DOT cygnus DOT com References: <20000619143403 DOT A16629 AT cygnus DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: ; from boriss@web.de on Tue, Jun 20, 2000 at 01:10:48AM +0200 On Tue, Jun 20, 2000 at 01:10:48AM +0200, Boris Schäling wrote: >> -----Original Message----- >> From: cygwin-owner AT sourceware DOT cygnus DOT com >> [mailto:cygwin-owner AT sourceware DOT cygnus DOT com]On Behalf Of Chris Faylor >> Sent: Monday, June 19, 2000 8:34 PM >> To: cygwin AT sourceware DOT cygnus DOT com >> Subject: Re: select() implementation question >> >> >> select() on a socket uses the winsock version of select it does not >> establish connections, AFAIK. >> [...] > >I've written a small C program: It initializes a struct sockaddr_in, calls >socket(), bind(), listen() and saves the socket in a fd_set. Now there is >exact one listening port. Then select() is called (and the fd_set is passed >to select()). A second random port is opened for listening. When select() >returns "something" connects to this second random port and a connection is >established. After that this listening port is closed but the connection >remains. > >I have no problems to use "my" listening port - everything works well. I >just noticed that there are some additional unusual things happening so I >want to make sure that this is cygwin and not a bug in my application. Can >anyone confirm this behaviour of network applications under cygwin? If you >like I can send you the C source code: one file, 50 lines, nothing special. >It would be nice to know that this is select()'s standard behaviour then I >could happily go on coding. I can only repeat what I said above. Cygwin is working with all sorts of networking applications currently but that doesn't mean that there is not a problem lurking somewhere. The source code is available if you want to debug it but, I'm sorry, this is not something that I will be able to track down. Taking a quick glance at select.cc, I can see that cygwin select does open a dummy socket. Possibly it is not closing something when it returns. I really don't know. cgf -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com