New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
popen4 doesn't close filedescriptors when in Threads #38829
Comments
Running the following code under Linux will result in a
The nature of the bug seems to be that Python isn't --------------------------------------- import os
from threading import Thread
class Crash(Thread):
def run(self):
a = os.popen4('ls')
b = a[1].read()
for i in range(1000):
t = Crash()
t.start()
while t.isAlive():
pass
--------------------------------------- The same code without threads (Crash as a plain class) import os
class Crash:
def run(self):
a = os.popen4('ls')
b = a[1].read()
for i in range(1000):
t = Crash()
t.run()
|
Logged In: YES I can't duplicate this on Redhat 9. What OS, what version I tested with both 2.2.3 and 2.3b2 from CVS without Can you try the patch in bug bpo-761888 to see if that helps? |
Logged In: YES Duplicated with Python 2.3 on Red Hat 7.3 using A general solution for Popen[34] is not obvious to me. With |
Logged In: YES Please, could you verify if this problem persists in Python 2.3.4 If yes, in which version? Can you provide a test case? If the problem is solved, from which version? Note that if you fail to answer in one month, I'll close this bug Thank you! . Facundo |
Logged In: YES Works fine to me: Python 2.3.4 (#1, Oct 26 2004, 16:42:40) with glibc-2.3.4-2 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: