]> granicus.if.org Git - python/commitdiff
Issue #16481: multiprocessing no longer leaks process handles on Windows.
authorRichard Oudkerk <shibturn@gmail.com>
Thu, 15 Nov 2012 18:16:35 +0000 (18:16 +0000)
committerRichard Oudkerk <shibturn@gmail.com>
Thu, 15 Nov 2012 18:16:35 +0000 (18:16 +0000)
Lib/multiprocessing/forking.py
Misc/NEWS

index af6580dc5dcc8a9aea8e17d5b3d33a58eaf2f688..c5501a2f75339356990c0756c2659774c20cfa26 100644 (file)
@@ -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)
index 2c165e0847a415fc657d88c581ae5fe576c7be05..9e456057c6d2bbcdb02b8d5843ef8d95271438cf 100644 (file)
--- 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().