This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gvanrossum, neologix, r.david.murray, vstinner, yselivanov
Date 2014-07-16.08:20:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405498813.74.0.584718927576.issue21901@psf.upfronthosting.co.za>
In-reply-to
Content
> rdmurray@pydev:~/python/p34>python -c 'import resource; print(resource.getrlimit(resource.RLIMIT_NOFILE))'
> (1024L, 1048576L)

Oh, 1 million files is much bigger than 4 thousand files (4096).

The test should only test FD_SETSIZE + 10 files, the problem is to get FD_SETSITE:

        # A scalable implementation should have no problem with more than
        # FD_SETSIZE file descriptors. Since we don't know the value, we just
        # try to set the soft RLIMIT_NOFILE to the hard RLIMIT_NOFILE ceiling.

For example, on my Linux FD_SETSIZE is 1024, whereas the hard limit of RLIMIT_NOFILE is 4096.

/usr/include/linux/posix_types.h:#define __FD_SETSIZE	1024

Maybe we can simply expose the FD_SETSIZE constant in the select module? The constant is useful when you use select.select(), which is still heavily used on Windows.
History
Date User Action Args
2014-07-16 08:20:13vstinnersetrecipients: + vstinner, gvanrossum, r.david.murray, neologix, yselivanov
2014-07-16 08:20:13vstinnersetmessageid: <1405498813.74.0.584718927576.issue21901@psf.upfronthosting.co.za>
2014-07-16 08:20:13vstinnerlinkissue21901 messages
2014-07-16 08:20:13vstinnercreate