Skip to content

bpo-45919: Remove out of date comment#30090

Merged
corona10 merged 2 commits intopython:mainfrom
corona10:bpo-45919-comment
Dec 14, 2021
Merged

bpo-45919: Remove out of date comment#30090
corona10 merged 2 commits intopython:mainfrom
corona10:bpo-45919-comment

Conversation

@corona10
Copy link
Copy Markdown
Member

@corona10 corona10 commented Dec 13, 2021

@corona10
Copy link
Copy Markdown
Member Author

cc @eryksun

Comment thread Python/pylifecycle.c
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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