| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| On Windows, file descriptors wrapping Windows handles are now created non | ||
| inheritable by default (:pep:`446`). Patch by Zackery Spytz and Victor | ||
| Stinner. |
| Back | FazBrowse Home | New Git URL |
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWith else it would be clearer that the following code is not a fallback, but an alternative version.
Oh, and because almost all code is different, you can use different scripts, depending on the OS.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualitySorry, else on which line? Would you mind to elaborate?
The code calls msvcrt.get_osfhandle() and os.dup() on Windows on purpose. I explained it in a comment a few lines before.
I prefer to have a single code base on all platforms, since most of the code is in common. Only the code using msvcrt is optional. Even on Windows, msvcrt may not be available on Python implementations other than CPython.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityAh, I see now that there is a possibility for the code above to not raise an exception. So the code below this line can be executed on Windows.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe code makes sure that msvcrt.get_osfhandle() and os.dup() both raise an exception on the "not inherited" file descriptor.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.