summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorAlexey Izbyshev <izbyshev@ispras.ru>2018-10-20 00:28:22 (GMT)
committerVictor Stinner <vstinner@redhat.com>2018-10-20 00:28:22 (GMT)
commit834603112e6ca35944dd21105b01fca562dc3241 (patch)
tree9f4b6f18381528cba38610d214c4422572e572bc /Misc
parenta2670565d8f5c502388378aba1fe73023fd8c8d4 (diff)
downloadcpython-834603112e6ca35944dd21105b01fca562dc3241.zip
cpython-834603112e6ca35944dd21105b01fca562dc3241.tar.gz
cpython-834603112e6ca35944dd21105b01fca562dc3241.tar.bz2
bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784)
path_error() uses GetLastError() on Windows, but some os functions are implemented via CRT APIs which report errors via errno. This may result in raising OSError with invalid error code (such as zero). Introduce posix_path_error() function and use it where appropriate.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Windows/2018-03-08-20-02-38.bpo-32890.3jzFzY.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Windows/2018-03-08-20-02-38.bpo-32890.3jzFzY.rst b/Misc/NEWS.d/next/Windows/2018-03-08-20-02-38.bpo-32890.3jzFzY.rst
new file mode 100644
index 0000000..e8a63b3
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2018-03-08-20-02-38.bpo-32890.3jzFzY.rst
@@ -0,0 +1,2 @@
+Fix usage of GetLastError() instead of errno in os.execve() and
+os.truncate().