Commit 01217f67 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 0e07560b
......@@ -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 = []
......
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