X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 3 Aug 2011 09:49:50 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: python doesn't allow descriptors > 63 in select Message-ID: <20110803074950.GH5647@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Hi Jason, it looks like there's a build glitch in python: $ cat > sel.py < select(ins, [], [], 0) ValueError: filedescriptor out of range in select() I debugged this and it turns out that python does not call Cygwin's select function anymore, as soon as there's a file descriptor in the set which is >= 64. While the default value for FD_SETSIZE is 64 (see /usr/include/sys/types.h): # ifndef FD_SETSIZE # define FD_SETSIZE 64 AFAICS the python default for the fd set is 256, see the definition in /usr/include/python2.6/pyport.h: #ifndef FD_SETSIZE #define FD_SETSIZE 256 But somehow this didn't make it into the python build. On my Linux box, the same script only stops when it hits the soft descriptor limit, 1024 in my case. Can you have a look and, perhaps, provide a new python with a bigger internal FD_SETSIZE? The 256 from /usr/include/python2.6/pyport.h would already be ok, I guess, but 512 or so wouldn't hurt either... Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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