[issue3392] subprocess fails in select when descriptors are large
Mattias Engdegård yor...@users.sourceforge.net added the comment: The patch looks all right in general. I would use something like if poll in dir(select) instead of catching AttributeError which risks hiding bugs in _communicate_with_poll(). PEP8 probably wants spaces around the bitwise-or operator. Some systems cannot use TTYs in poll(2) but this should not be a problem here - there is no point in using .communicate() with stdin/ stdout/stderr set to anything but PIPE, right? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1153622] eval does not bind variables in lambda bodies correctly
Mattias Engdegård yor...@users.sourceforge.net added the comment: This is not a vague wish at all. The implementation is at odds with the documentation, and in fact nobody has been able to explain just how Python works or should work. Read msg24424 again - it all boils down to explaining why the variable x in def f(x): return eval('x') and def f(x): return eval('lambda: x') should be interpreted differently, whereas in def f(x): return x and def f(x): return lambda: x the same x is used in both cases. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1153622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3392] subprocess fails in select when descriptors are large
Mattias Engdegård [EMAIL PROTECTED] added the comment: As the comment in the original bug report said, you need to raise the file descriptor limit to something well above 2000 before running the test case. Needless to say, you may need to do that part as root in case that would exceed your hard RLIMIT_NOFILE limit. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3392] subprocess fails in select when descriptors are large
New submission from Mattias Engdegård [EMAIL PROTECTED]: 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 [EMAIL PROTECTED] http://bugs.python.org/issue3392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com