X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0	tests=AWL,BAYES_00,TW_FD,UNPARSEABLE_RELAY
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o-
Date: Wed, 23 Mar 2011 16:14:24 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: python select() is limited to fds < 64
Message-ID: <20110323201424.GD5588@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4D88F89B.6000308@dronecode.org.uk> <4D88FE3E.2070607@sh.cvut.cz> <20110322200804.GA22409@ednor.casa.cgf.cx> <4D89DA22.9010404@dronecode.org.uk> <20110323150038.GE13862@ednor.casa.cgf.cx> <4D8A21F7.1020206@dronecode.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D8A21F7.1020206@dronecode.org.uk>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, Mar 23, 2011 at 04:38:15PM +0000, Jon TURNEY wrote:
>On 23/03/2011 15:00, Christopher Faylor wrote:
>> On Wed, Mar 23, 2011 at 11:31:46AM +0000, Jon TURNEY wrote:
>>> On 22/03/2011 20:08, Christopher Faylor wrote:
>>>> On Tue, Mar 22, 2011 at 08:53:34PM +0100, V??clav Haisman wrote:
>>>>> Jon TURNEY wrote, On 22.3.2011 20:29:
>>>>>>
>>>>>> python seems to be built with the default value of FD_SETSIZE, which is
>>>>>> only 64 on cygwin.
>>>>> Is this not because of the inherent limitation of
>>>>> WaitForMultipleObjects() call?
>>>>
>>>> Yep.  Without a rewrite, it's a hard limit to Cygwin's select().
>>>
>>> Please read my email more closely.  I am not saying "python select() is
>>> limited to waiting on 64 fds or less", I am saying "python select() is
>>> limited to waiting on fd which are less than 64"
>> 
>> I forgot to add one bit of data.  Unless you go out of your way to
>> change it, Cygwin's select can't wait for an fd > 63.  It's basically a
>> bit mask.  So, there are two limitations: 1) the number of handles that
>> you can wait for with WaitForMultipleObjects() and 2) the size of
>> Cygwin's fd_set.
>
>Yes, I know fd_set is implemented as a bitmap.  It's size is controlled by
>FD_SETSIZE.  That is the whole point of the patch in the original mail.

I actually did see that last night and then promptly forgot it.

I assume you know that this greately increases the likelihood that
select() will fail with an EINVAL.  Maybe python somehow deals
gracefully with that.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

