Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f7c4b8

Browse files
committed
Issue #16481: Merge
2 parents 9bd7f22 + 021f4c2 commit 8f7c4b8

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/multiprocessing/forking.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ def __init__(self, process_obj):
233233
self.returncode = None
234234
self._handle = hp
235235
self.sentinel = int(hp)
236+
util.Finalize(self, _winapi.CloseHandle, (self.sentinel,))
236237

237238
# send information to child
238239
Popen._tls.process_handle = int(hp)

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ Core and Builtins
127127
Library
128128
-------
129129

130+
- Issue #16481: multiprocessing no longer leaks process handles on Windows.
131+
130132
- Issue #12428: Add a pure Python implementation of functools.partial().
131133
Patch by Brian Thorne.
132134

0 commit comments

Comments
 (0)