Merged revisions 73825-73826 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73825 | gregory.p.smith | 2009-07-03 18:49:29 -0700 (Fri, 03 Jul 2009) | 9 lines

  Use select.poll() in subprocess, when available, rather than select() so that
  it does not fail when file descriptors are large.  Fixes issue3392.

  Patch largely contributed by Frank Chu (fpmc) with some improvements by me.
  See http://bugs.python.org/issue3392.
........
  r73826 | gregory.p.smith | 2009-07-03 18:55:11 -0700 (Fri, 03 Jul 2009) | 2 lines

  news entry for r73825
........

Candidate for backporting to release31-maint as it is a bug fix and changes no
public API.
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 326c996..f2a396c 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -798,8 +798,24 @@
                 if dir is not None:
                     os.rmdir(dir)
 
+
+unit_tests = [ProcessTestCase, CommandTests]
+
+if subprocess._has_poll:
+    class ProcessTestCaseNoPoll(ProcessTestCase):
+        def setUp(self):
+            subprocess._has_poll = False
+            ProcessTestCase.setUp(self)
+
+        def tearDown(self):
+            subprocess._has_poll = True
+            ProcessTestCase.tearDown(self)
+
+    unit_tests.append(ProcessTestCaseNoPoll)
+
+
 def test_main():
-    support.run_unittest(ProcessTestCase, CommandTests)
+    support.run_unittest(*unit_tests)
     support.reap_children()
 
 if __name__ == "__main__":