summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/popen_spawn_posix.py
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-06-24 17:22:23 (GMT)
committerGitHub <noreply@github.com>2017-06-24 17:22:23 (GMT)
commit13e96cc596d158b98996db3fa291086ea4afecd9 (patch)
treee5d5abb7f5364b484ca4396ff99986ccac16ed0c /Lib/multiprocessing/popen_spawn_posix.py
parent0ee32c148119031e19c79359f5c4789ee69fa355 (diff)
downloadcpython-13e96cc596d158b98996db3fa291086ea4afecd9.zip
cpython-13e96cc596d158b98996db3fa291086ea4afecd9.tar.gz
cpython-13e96cc596d158b98996db3fa291086ea4afecd9.tar.bz2
Fix bpo-30596: Add close() method to multiprocessing.Process (#2010)
* Fix bpo-30596: Add close() method to multiprocessing.Process * Raise ValueError if close() is called before the Process is finished running * Add docs * Add NEWS blurb
Diffstat (limited to 'Lib/multiprocessing/popen_spawn_posix.py')
-rw-r--r--Lib/multiprocessing/popen_spawn_posix.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/multiprocessing/popen_spawn_posix.py b/Lib/multiprocessing/popen_spawn_posix.py
index 98f8f0a..3815106 100644
--- a/Lib/multiprocessing/popen_spawn_posix.py
+++ b/Lib/multiprocessing/popen_spawn_posix.py
@@ -62,7 +62,7 @@ class Popen(popen_fork.Popen):
f.write(fp.getbuffer())
finally:
if parent_r is not None:
- util.Finalize(self, os.close, (parent_r,))
+ self.finalizer = util.Finalize(self, os.close, (parent_r,))
for fd in (child_r, child_w, parent_w):
if fd is not None:
os.close(fd)