diff options
author | Itai Steinherz <itaisteinherz@gmail.com> | 2022-05-09 22:42:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-09 22:42:59 (GMT) |
commit | 1fb25a96aeceae4b8615a7ab550bf7538353e5c5 (patch) | |
tree | c36ba26e13b22889341766ba904656e99042bad2 /Misc | |
parent | 249be828e475202fd6f63fc357be75eca1267c9f (diff) | |
download | cpython-1fb25a96aeceae4b8615a7ab550bf7538353e5c5.zip cpython-1fb25a96aeceae4b8615a7ab550bf7538353e5c5.tar.gz cpython-1fb25a96aeceae4b8615a7ab550bf7538353e5c5.tar.bz2 |
bpo-46785: Fix race condition between os.stat() and unlink on Windows (GH-31858)
* [3.9] bpo-46785: Fix race condition between os.stat() and unlink on Windows (GH-31858).
(cherry picked from commit 39e6b8ae6a5b49bb23746fdcc354d148ff2d98e3)
Co-authored-by: Itai Steinherz <itaisteinherz@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Windows/2022-03-13-20-35-41.bpo-46785.Pnknyl.rst | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -1664,6 +1664,7 @@ Anthony Starks David Steele Oliver Steele Greg Stein +Itai Steinherz Marek Stepniowski Baruch Sterin Chris Stern diff --git a/Misc/NEWS.d/next/Windows/2022-03-13-20-35-41.bpo-46785.Pnknyl.rst b/Misc/NEWS.d/next/Windows/2022-03-13-20-35-41.bpo-46785.Pnknyl.rst new file mode 100644 index 0000000..0a87abd --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2022-03-13-20-35-41.bpo-46785.Pnknyl.rst @@ -0,0 +1 @@ +Fix race condition between :func:`os.stat` and unlinking a file on Windows, by using errors codes returned by ``FindFirstFileW()`` when appropriate in ``win32_xstat_impl``. |