Repository navigation
GH-88050: fix race in closing subprocess pipe in asyncio - #97951
Conversation
commented
Oct 6, 2022
|
@gvanrossum: In rare cases it is possible that pipe was closed before process exited, so this skips closing if is it is already closed. It also aligns it with the close method which skips it too. cpython/Lib/asyncio/base_subprocess.py Lines 96 to 104 in 0d68879 |
left a comment
There was a problem hiding this comment.
When I reviewed this part in the original PR I did think "how do we know these pipe values aren't None" but didn't express it. I now checked, and the other two places that iterate over self._pipes.values() do check for None so this fix seems correct.
commented
Oct 6, 2022
|
Thanks @kumaraditya303 for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
commented
Oct 6, 2022
|
Sorry @kumaraditya303 and @gvanrossum, I had trouble checking out the |
commented
Oct 6, 2022
Yeah, it shouldn't happen in the usual case and confirmed as the CI is green without this but still may happen so better be on the safe side. |
commented
Oct 6, 2022
|
Thanks @kumaraditya303 for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
commented
Oct 6, 2022
|
GH-97978 is a backport of this pull request to the 3.11 branch. |
Uh oh!
There was an error while loading. Please reload this page.