[Python-checkins] cpython (3.3): Issue #16481: multiprocessing no longer leaks process handles on Windows.

richard.oudkerk python-checkins at python.org
Thu Nov 15 19:24:20 CET 2012


http://hg.python.org/cpython/rev/c574ce78cd61
changeset: 80444:c574ce78cd61
branch: 3.3
parent: 80441:a8ca14983ab1
user: Richard Oudkerk <shibturn at gmail.com>
date: Thu Nov 15 18:16:35 2012 +0000
summary:
 Issue #16481: multiprocessing no longer leaks process handles on Windows.
files:
 Lib/multiprocessing/forking.py | 1 +
 Misc/NEWS | 2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Lib/multiprocessing/forking.py b/Lib/multiprocessing/forking.py
--- a/Lib/multiprocessing/forking.py
+++ b/Lib/multiprocessing/forking.py
@@ -233,6 +233,7 @@
 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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -85,6 +85,8 @@
 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().
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /