### Eclipse Workspace Patch 1.0
#P Twisted
Index: twisted/test/test_process.py
===================================================================
--- twisted/test/test_process.py        (revision 27250)
+++ twisted/test/test_process.py        (working copy)
@@ -7,7 +7,6 @@

 import gzip
 import os
-import popen2
 import sys
 import signal
 import StringIO
@@ -2330,7 +2329,17 @@
     FDTest.skip = skipMessage
 else:
     # do this before running the tests: it uses SIGCHLD and stuff internally
-    lsOut = popen2.popen3("/bin/ls ZZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")[2].read()
+    cmd = "/bin/ls ZZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+    try:
+        from subprocess import Popen, PIPE
+        p = Popen(cmd, shell=True,
+          stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
+        child_stderr = p.stderr
+    except ImportError:
+        import popen2
+        child_stderr = popen2.popen3(cmd)[2]
+
+    lsOut = child_stderr.read()

 if (runtime.platform.getType() != 'win32') or (not interfaces.IReactorProcess(reactor, None)):
     Win32ProcessTestCase.skip = skipMessage
