-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
bpo-31106: Fix handling of erros in posix_fallocate() (#3000) #3000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@nirs I confused. Should I fix anything in code ? Seems everything is right according to our conversation. |
@Mariatta @larryhastings |
ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch! I'd like just a few small changes.
I understand why you just assign to errno the way you did, but I think we can do a little better. Instead, please change the "errno == EINTR" to "result == EINTR" in both functions, and only assign to errno immediately before calling posix_error(). (It's reasonable to assign to errno there because of how posix_error() works.)
Note that we can safely assign to errno outside ALLOW_THREADS, because errno is per-thread (using amazing magic).
I wish I knew why these functions don't assign to errno...!
A Python core developer, larryhastings, has requested some changes be Once you have made the requested changes, please leave a comment |
That's a big improvement. Thanks for the patch, and the cleanup! |
Thanks @socketpair for the PR, and @larryhastings for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
GH-4101 is a backport of this pull request to the 3.6 branch. |
…se() (pythonGH-3000) (pythonGH-3000) (cherry picked from commit d4b93e2)
https://bugs.python.org/issue31106