]> granicus.if.org Git - python/commit
subprocess: close pipes/fds by using ExitStack (GH-11686)
authorGiampaolo Rodola <g.rodola@gmail.com>
Tue, 29 Jan 2019 21:14:24 +0000 (22:14 +0100)
committerGregory P. Smith <greg@krypto.org>
Tue, 29 Jan 2019 21:14:24 +0000 (13:14 -0800)
commitbafa8487f77fa076de3a06755399daf81cb75598
tree8c8ace269bfe20263047098a1e612930c2ca82a4
parent742d768656512a469ce9571b1cbd777def7bc5ea
subprocess: close pipes/fds by using ExitStack (GH-11686)

Close pipes/fds in subprocess by using ExitStack.

"In case of premature failure on X.Close() or os.close(X) the remaining pipes/fds will remain "open". Perhaps it makes sense to use contextlib.ExitStack."
- Rationale: https://github.com/python/cpython/pull/11575#discussion_r250288394
Lib/subprocess.py
Misc/NEWS.d/next/Library/2019-01-29-17-24-52.bpo-35537.Q0ktFC.rst [new file with mode: 0644]