Applied patch #1506758: Prevent MemoryErrors with large MAXFD.

This commit is contained in:
Peter Astrand 2006-06-22 20:21:26 +00:00
parent d6b2430b7a
commit ff355f1ada
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class Popen3:
def _run_child(self, cmd):
if isinstance(cmd, basestring):
cmd = ['/bin/sh', '-c', cmd]
for i in range(3, MAXFD):
for i in xrange(3, MAXFD):
try:
os.close(i)
except OSError:

View File

@ -941,7 +941,7 @@ class Popen(object):
def _close_fds(self, but):
for i in range(3, MAXFD):
for i in xrange(3, MAXFD):
if i == but:
continue
try: