mirror of
https://github.com/python/cpython.git
synced 2024-12-18 06:14:00 +08:00
Patch #817329: Use SC_OPEN_MAX to determine MAXFD. Backported to 2.3.
This commit is contained in:
parent
0a4a50dd85
commit
f563c8bbac
@ -11,7 +11,10 @@ import sys
|
||||
|
||||
__all__ = ["popen2", "popen3", "popen4"]
|
||||
|
||||
MAXFD = 256 # Max number of file descriptors (os.getdtablesize()???)
|
||||
try:
|
||||
MAXFD = os.sysconf('SC_OPEN_MAX')
|
||||
except (AttributeError, ValueError):
|
||||
MAXFD = 256
|
||||
|
||||
_active = []
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user