delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/08/17:54:58

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Tue, 8 Aug 2000 17:53:49 -0400
To: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: 1.1.4 select and poll false positive past 32 descriptors
Message-ID: <20000808175349.A22740@cygnus.com>
Reply-To: cygwin AT sources DOT redhat DOT com
Mail-Followup-To: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
References: <410A7080D2D2D11185F800A0C9663B823E8948 AT pulse-bdc DOT pulse DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.3.6i
In-Reply-To: <410A7080D2D2D11185F800A0C9663B823E8948@pulse-bdc.pulse.com>; from Ted.Soo-Hoo@go.ecitele.com on Tue, Aug 08, 2000 at 05:21:49PM -0400

On Tue, Aug 08, 2000 at 05:21:49PM -0400, Ted Soo-Hoo wrote:
>The idea for polling comes from select.cc code which goes down a
>different path for that case.  I also ran under strace and saw that a
>pended operation bases its returned size on a value n which is always
>small, e.g.  1 or 2 and not the expected value to copy out.  That value
>should be based on the maximum file descriptor given by the user, but
>not work too hard beyond that.

From the linux man page on select:
       n is the highest-numbered descriptor in any of  the  three
       sets, plus 1.

What is allocated in select.cc reflects the maxiumum number of fds
that can be operated on.  It's essentially a bit mask.  I don't know
why you are mentioning this.  If your maximum fd is something like
64, then the fd_set's allocated should be at least that large.

I don't know what "the expected value to copy out" might be or what
you mean by "not work too hard beyond that".

>A possible fix would be to change the loop that does the counting to
>count n less conditionally.  Just a thought.  I don't understand all
>the code.

I think what you are reporting is that the winsock version of select
only handles 32 elements.  That's an unfortunate limitation.  It would
probably be possible to work around this by forking multiple threads to
handle multiple winsock selects but this would be a fairly major change
and I am not aware of anyone contemplating this.  Sorry.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019