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

This commit is contained in:
Martin v. Löwis 2003-10-06 21:34:33 +00:00
parent 0a4a50dd85
commit f563c8bbac

View File

@ -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 = []