Message223181
> 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. |
|
Date |
User |
Action |
Args |
2014-07-16 08:20:13 | vstinner | set | recipients:
+ vstinner, gvanrossum, r.david.murray, neologix, yselivanov |
2014-07-16 08:20:13 | vstinner | set | messageid: <1405498813.74.0.584718927576.issue21901@psf.upfronthosting.co.za> |
2014-07-16 08:20:13 | vstinner | link | issue21901 messages |
2014-07-16 08:20:13 | vstinner | create | |
|