[New-bugs-announce] [issue3392] subprocess fails in select when descriptors are large

Mattias Engdegård report at bugs.python.org
Thu Jul 17 13:25:40 CEST 2008


New submission from Mattias Engdegård <yorick at users.sourceforge.net>:

If the stdin/out file descriptors are too large to be used with
select(), subprocess will fail in .communicate(). Example:

# raise the fd limit to something like 2048 before running this
import subprocess
somefiles = [open("/etc/passwd") for i in xrange(2000)]
print subprocess.Popen(["date"], stdout=subprocess.PIPE).communicate()

The solution would be to use select.poll() in subprocess instead.

----------
components: Library (Lib)
messages: 69880
nosy: yorick
severity: normal
status: open
title: subprocess fails in select when descriptors are large
versions: Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3392>
_______________________________________


More information about the New-bugs-announce mailing list