bpo-32862: Make os.dup2(fd, fd) a no-op for valid fd
os.dup2(fd, fd, inheritable=True) never changed fd inheritability, but with inheritable=False the function might fail or change it in an inconsistent manner depending on the platform.
https://bugs.python.org/issue32862
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.
Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.
This PR is stale because it has been open for 30 days with no activity.
Last time this PR was modified five years ago and still has unresolved reviews. If it stays abandoned, it will be closed.
I'm going to rebase this PR and address the review within a week, please don't close.
After revisiting this issue I've come to think that the approach taken in this PR may be not the best. I've created an alternative PR #102148.
I intend to keep this PR open until the discussion in issue #77043 comes to a conclusion.