Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r59444:97d086354044
Date: 2012-12-14 05:57 -0500
http://bitbucket.org/pypy/pypy/changeset/97d086354044/

Log:    make fcntl.test_ioctl failure reproducible

diff --git a/pypy/module/fcntl/test/test_fcntl.py 
b/pypy/module/fcntl/test/test_fcntl.py
--- a/pypy/module/fcntl/test/test_fcntl.py
+++ b/pypy/module/fcntl/test/test_fcntl.py
@@ -186,10 +186,7 @@
         #raises(TypeError, fcntl.ioctl, 0, TIOCGPGRP, float(0))
         raises(TypeError, fcntl.ioctl, 0, TIOCGPGRP, 1, "foo")
 
-        child_pid, mfd = pty.fork()
-        if child_pid == 0:
-            # We're the child
-            return
+        mfd, sfd = pty.openpty()
         try:
             buf = array.array('i', [0])
             res = fcntl.ioctl(mfd, TIOCGPGRP, buf, True)
@@ -211,6 +208,7 @@
             assert res == expected
         finally:
             os.close(mfd)
+            os.close(sfd)
 
     def test_ioctl_int(self):
         import os
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to