mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Patch #817329: Use SC_OPEN_MAX to determine MAXFD. Backported to 2.3.
This commit is contained in:
parent
0a4a50dd85
commit
f563c8bbac
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue