-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
What should run_process do if it's cancelled but it can't kill the child process? #1209
Comments
So the problem here is that the So I guess Options:
None of these are super appealing, but I think they're the only options we have? Anyone have any thoughts on why one would be better than another? @dj-foxxy What would you expect to happen, given that what you'd actually expect (the process being killed) isn't possible? |
In case anyone's curious, here's what the traceback looks like currently:
|
@njsmith In general, I think the current behaviour is the correct default: either cleanup happened or raise. However, the number of specific use cases is so broad that I think this needs to be a customisation point. For example, in code that promoted this issue, I'd really like clean up to use another subprocess to call This might already been possible, I'm too new the project to know for sure. Thanks. |
So the policy proposed in #1525 is:
And if you'd prefer to abandon the child on cancellation, you can't do that with |
@njsmith Look like what I need, this is going to simplify so much code! Had a look at the PR. Is it worth mentioning in the Looking forward to removing all my hacks! :) |
The async context manager tries to
SIGKILL
the subprocess, which causes aPermissionError
if that subprocess issudo
The text was updated successfully, but these errors were encountered: