Skip to content

bpo-45919: Remove out of date comment #30090

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

Merged
merged 2 commits into from
Dec 14, 2021
Merged

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Dec 13, 2021

@corona10
Copy link
Member Author

cc @eryksun

Only use dup() on platforms where dup() is enough to detect invalid FD in
corner cases: on Linux and Windows (bpo-32849).
Only use dup() on Linux where dup() is enough to detect invalid FD
(bpo-32849).
Copy link
Member

Choose a reason for hiding this comment

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

On the "fcntl(fd, F_GETFD) is even faster, because it only checks the process table" comment, you can add that it is preferred over dup() when avaialble, since it cannot fail with the "too many open files" error (EMFILE).

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

@corona10 corona10 merged commit 9130a4d into python:main Dec 14, 2021
@corona10 corona10 deleted the bpo-45919-comment branch December 14, 2021 01:31
@vstinner
Copy link
Member

Thanks.

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

Successfully merging this pull request may close these issues.

4 participants