Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bd3dcb3

Browse filesBrowse files
[3.11] GH-88050: fix race in closing subprocess pipe in asyncio (GH-97951) (#97978)
Check for None when iterating over `self._pipes.values()`. (cherry picked from commit e2e6b95) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
1 parent 1cd19f7 commit bd3dcb3
Copy full SHA for bd3dcb3

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎Lib/asyncio/base_subprocess.py

Copy file name to clipboardExpand all lines: Lib/asyncio/base_subprocess.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ def _process_exited(self, returncode):
216216
self._proc.returncode = returncode
217217
self._call(self._protocol.process_exited)
218218
for p in self._pipes.values():
219-
p.pipe.close()
219+
if p is not None:
220+
p.pipe.close()
221+
220222
self._try_finish()
221223

222224
async def _wait(self):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.