From: Richard Oudkerk Date: Thu, 15 Nov 2012 18:16:35 +0000 (+0000) Subject: Issue #16481: multiprocessing no longer leaks process handles on Windows. X-Git-Tag: v3.3.1rc1~633 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=021f4c2ecca4e65755fc39b01b7819df8dd9993f;p=python Issue #16481: multiprocessing no longer leaks process handles on Windows. --- diff --git a/Lib/multiprocessing/forking.py b/Lib/multiprocessing/forking.py index af6580dc5d..c5501a2f75 100644 --- a/Lib/multiprocessing/forking.py +++ b/Lib/multiprocessing/forking.py @@ -233,6 +233,7 @@ else: self.returncode = None self._handle = hp self.sentinel = int(hp) + util.Finalize(self, _winapi.CloseHandle, (self.sentinel,)) # send information to child Popen._tls.process_handle = int(hp) diff --git a/Misc/NEWS b/Misc/NEWS index 2c165e0847..9e456057c6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -85,6 +85,8 @@ Core and Builtins Library ------- +- Issue #16481: multiprocessing no longer leaks process handles on Windows. + - Issue #16140: The subprocess module no longer double closes its child subprocess.PIPE parent file descriptors on child error prior to exec().