Skip to content
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

return the new file descriptor from os.dup2 (closes bpo-32441) #5041

Merged
merged 2 commits into from
Dec 29, 2017

Conversation

benjaminp
Copy link
Contributor

@benjaminp benjaminp commented Dec 29, 2017

@benjaminp benjaminp force-pushed the benjamin-dup2-return branch from 4f56378 to 251d3a2 Compare December 29, 2017 07:24
@@ -7855,7 +7856,7 @@ os_dup2_impl(PyObject *module, int fd, int fd2, int inheritable)

#endif

Py_RETURN_NONE;
return PyLong_FromLong(res);
Copy link
Member

Choose a reason for hiding this comment

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

Why don't you rely on Argument Clinic as os_dup_impl does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case, argument clinic actually complicates the error handling, but I suppose it's the future.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

LGTM.

@benjaminp benjaminp merged commit bbdb17d into master Dec 29, 2017
@benjaminp benjaminp deleted the benjamin-dup2-return branch December 29, 2017 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants