SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

72153 0 0 Python

gh-137335: Fix unlikely name conflicts for named pipes in multiprocessing and asyncio on Windows (#137389)

Since os.stat() raises an OSError for existing named pipe "\\.\pipe\...",
os.path.exists() always returns False for it, and tempfile.mktemp() can
return a name that matches an existing named pipe.

So, tempfile.mktemp() cannot be used to generate unique names for named
pipes. Instead, CreateNamedPipe() should be called in a loop with
different names until it completes successfully.
S
Serhiy Storchaka committed
d6a71f4690c702892644b1fbae90ae9ef733a8ab
Parent: ca66d3c
Committed by GitHub <noreply@github.com> on 2/24/2026, 11:27:49 AM