gh-87474: Fix file descriptor leaks in subprocess.Popen by cptpcrd · Pull Request #96351 · python/cpython
Simplifies the logic and should help avoid mistakes in the future. Co-authored-by: Gregory P. Smith <greg@krypto.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
…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>
gpshead added a commit that referenced this pull request
) (#104563) gh-87474: Fix file descriptor leaks in subprocess.Popen (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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters