This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Possible problems in select() under Win95/98/ME


On Wed, 31 Jan 2001 21:34:37 +1000, Vic Cross
    <vic.cross@veejoe.com.au> wrote:
> 
> The usual process of building a file descriptor set (containing the
> file descriptors for the listener socket and any connected clients)
> and entering a blocking select() call works flawlessly under Linux,
> but under Cygwin the select() appears to ignore the connected clients 
> -- that is, select() does not unblock for incoming data on a client, 
> and a new connection must be initiated to force select() to unblock
 [snip]

I have written a small proxy that use blocking select() and it works
fine on W95/98 (not checked on ME). I've checked ssh and it is also
working with blocking select (it is in packet.c). So, at least in some
cases, select() is working on W95/98.

> This workaround uncovered another problem in select() -- every time
> select() returns, a TCP loopback connection is created and sits in
> TIME_WAIT status until it ages out.  Various methods and tests have
> shown that the spurious connection is *definitely* co-incident with
> the return from select().

I checked with netstat (on W95) and there seems to be some (2 to 4)
loopback connections created. I never so more than 4 connections.

As it happens I had time-out in my proxy for the select(), set to 30
seconds, I changed it to 1 and 3 second and ran my proxy. There seem
to be loopback connection created for each select() return. Then I had
some net activity (not related to the proxy or Cygwin) and the creation
of the loopback connection CEASED !. I then changed the time-out to
300 milliseconds, and no loopback connection was created.

Ehud.


-- 
 @@@@@@ @@@ @@@@@@ @    @   Ehud Karni  Simon & Wiesel  Insurance agency
     @    @      @  @@  @   Tel: +972-3-6212-757    Fax: +972-3-6292-544
     @    @ @    @ @  @@    (USA)  Fax  and  voice  mail:  1-815-5509341
     @    @ @    @ @    @        Better     Safe     Than     Sorry
 http://www.simonwiesel.co.il    mailto:ehud@unix.simonwiesel.co.il

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]