Skip to content

[3.7] bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784)#9984

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-8346031-3.7
Oct 20, 2018
Merged

[3.7] bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784)#9984
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-8346031-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 20, 2018

Copy link
Copy Markdown
Contributor

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.
(cherry picked from commit 8346031)

Co-authored-by: Alexey Izbyshev izbyshev@ispras.ru

https://bugs.python.org/issue32890

…uncate() (pythonGH-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.
(cherry picked from commit 8346031)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

@miss-islington

Copy link
Copy Markdown
Contributor Author

@izbyshev and @vstinner: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 8f53dcd into python:3.7 Oct 20, 2018
@miss-islington miss-islington deleted the backport-8346031-3.7 branch October 20, 2018 00:46
@miss-islington

Copy link
Copy Markdown
Contributor Author

@izbyshev and @vstinner: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants