Commit f563c8bb authored by Martin v. Löwis's avatar Martin v. Löwis

Patch #817329: Use SC_OPEN_MAX to determine MAXFD. Backported to 2.3.

parent 0a4a50dd
...@@ -11,7 +11,10 @@ import sys ...@@ -11,7 +11,10 @@ import sys
__all__ = ["popen2", "popen3", "popen4"] __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 = [] _active = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment