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
subprocess: optional auto-reaping fixing os.wait() lossage #41885
Comments
The subprocess module automatically reaps child I discussed this with the author, Peter Åstrand, and However, the auto-reaping interacts badly with The solution is to allow the user to create Popen This patch does three things:
For completeness, here is a test case: import os, subprocess, time
p = subprocess.Popen(["/bin/true"]).pid
time.sleep(1)
subprocess.call(["/bin/false"])
(pid, status) = os.wait()
print "got", pid, "expected", p The above code will throw an exception. With the patch, |
Logged In: YES
Sorry, this should be "non-blocking wait". |
Logged In: YES Revised patch, using a dict instead of a set (for |
Logged In: YES This has been fixed in the subversion trunk in a different Marking this one as outdated. |
15 years later, it seems asyncio subprocesses may have the same issue. :) |
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: