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

[3.11] gh-87474: Fix file descriptor leaks in subprocess.Popen (GH-96351) #104563

Merged
merged 1 commit into from
May 17, 2023

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 16, 2023

This fixes several ways file descriptors could be leaked from subprocess.Popen constructor during error conditions by opening them later and using a context manager "fds to close" registration scheme to ensure they get closed before returning.


(cherry picked from commit 3a4c44b)

Co-authored-by: cptpcrd 31829097+cptpcrd@users.noreply.github.com
Co-authored-by: Gregory P. Smith [Google] greg@krypto.org

…GH-96351)

This fixes several ways file descriptors could be leaked from `subprocess.Popen` constructor during error conditions by opening them later and using a context manager "fds to close" registration scheme to ensure they get closed before returning.

---------

(cherry picked from commit 3a4c44b)

Co-authored-by: cptpcrd <31829097+cptpcrd@users.noreply.github.com>
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
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