Created
June 25, 2015 14:35
-
-
Save bwesterb/18a7e96799a85f7d4e5f to your computer and use it in GitHub Desktop.
Popen bug in pypy?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
while True: | |
p = subprocess.Popen(['cat'], stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE) | |
p.stdin.close() | |
p.wait() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pypy bug.py | |
Traceback (most recent call last): | |
File "app_main.py", line 75, in run_toplevel | |
File "bug.py", line 5, in <module> | |
stdout=subprocess.PIPE) | |
File "/opt/local/lib/pypy/lib-python/2.7/subprocess.py", line 725, in __init__ | |
errread, errwrite) | |
File "/opt/local/lib/pypy/lib-python/2.7/subprocess.py", line 1234, in _execute_child | |
errpipe_read, errpipe_write = self.pipe_cloexec() | |
File "/opt/local/lib/pypy/lib-python/2.7/subprocess.py", line 1186, in pipe_cloexec | |
r, w = os.pipe() | |
OSError: [Errno 24] Too many open files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment