[Python-checkins] cpython: Issue #8713: Cleanup before saving process._dangling.
richard.oudkerk
python-checkins at python.org
Thu Aug 29 14:34:00 CEST 2013
http://hg.python.org/cpython/rev/e99832a60e63
changeset: 85447:e99832a60e63
user: Richard Oudkerk <shibturn at gmail.com>
date: Thu Aug 29 12:51:11 2013 +0100
summary:
Issue #8713: Cleanup before saving process._dangling.
files:
Lib/test/regrtest.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1010,8 +1010,10 @@
'os.environ', 'sys.path', 'sys.path_hooks', '__import__',
'warnings.filters', 'asyncore.socket_map',
'logging._handlers', 'logging._handlerList', 'sys.gettrace',
- 'sys.warnoptions', 'threading._dangling',
- 'multiprocessing.process._dangling',
+ 'sys.warnoptions',
+ # multiprocessing.process._cleanup() may release ref
+ # to a thread, so check processes first.
+ 'multiprocessing.process._dangling', 'threading._dangling',
'sysconfig._CONFIG_VARS', 'sysconfig._INSTALL_SCHEMES',
'support.TESTFN', 'locale', 'warnings.showwarning',
)
@@ -1141,6 +1143,8 @@
def get_multiprocessing_process__dangling(self):
if not multiprocessing:
return None
+ # Unjoined process objects can survive after process exits
+ multiprocessing.process._cleanup()
# This copies the weakrefs without making any strong reference
return multiprocessing.process._dangling.copy()
def restore_multiprocessing_process__dangling(self, saved):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list