[Patches] [ python-Patches-1434657 ] Patch to support lots of file descriptors

SourceForge.net noreply at sourceforge.net
Tue Feb 28 09:50:07 CET 2006


Patches item #1434657, was opened at 2006-02-19 17:34
Message generated for change (Comment added) made by svenberkvens
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1434657&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Sven Berkvens-Matthijsse (svenberkvens)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch to support lots of file descriptors

Initial Comment:
Off-the-shelf Python on FreeBSD (and probably other
OS'es as well) has a limit on the number of file
descriptors that select can use. This is limited by the
size of the fdset structures.

On FreeBSD, and probably in many OS'es, a user can set
the size of the fdset structures if he defines
FD_SETSIZE before he includes sys/types.h.

My patch sets the FD_SETSIZE to a substantial number.


----------------------------------------------------------------------

>Comment By: Sven Berkvens-Matthijsse (svenberkvens)
Date: 2006-02-28 09:50

Message:
Logged In: YES 
user_id=175845

Is it perhaps possible to add a test to the configuring
process that tests whether something like:

#define FD_SETSIZE 10240
#include <sys/types.h>
#include <unistd.h>

int main(int argc, char **argv)
{
#if FD_SETSIZE == 10000
    return 0;
#else
    return 1;
#endif
}

can be preprocessed, compiled and run correctly? This will
most probably fail on systems where FD_SETSIZE is not
settable, and succeed on systems where it is.

Thanks for responding,
Sven

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2006-02-27 22:54

Message:
Logged In: YES 
user_id=21627

That patch is wrong: you should only change the value of FD_SETSIZE on systems 
where this actually works. Unfortunately, I cannot think of a method to determine 
this reliably.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1434657&group_id=5470


More information about the Patches mailing list