This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2019-06-26.11:53:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561549994.59.0.313860282111.issue37410@roundup.psfhosted.org>
In-reply-to
Content
subprocess.Popen uses _winapi.CreateProcess() to spawn a child process. It stores the process handle using a Handle class. Popen never explicitly releases the handle, it rely on Handle.__del__ when the Popen object is detroyed (when Popen._handle attribute is cleared).

As discussed in bpo-37380, we could call explicitly CloseHandle(handle) as soon as the child process completes, to release resources in the Windows kernel.

Attached PR implements this fix.
History
Date User Action Args
2019-06-26 11:53:14vstinnersetrecipients: + vstinner
2019-06-26 11:53:14vstinnersetmessageid: <1561549994.59.0.313860282111.issue37410@roundup.psfhosted.org>
2019-06-26 11:53:14vstinnerlinkissue37410 messages
2019-06-26 11:53:14vstinnercreate