diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-07-24 11:02:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 11:02:20 (GMT) |
commit | 06634950c553f8df83330ed468c11483b857b7dc (patch) | |
tree | f63a96a0110fca2e83dda885b78dbf0abb17fae5 /Lib | |
parent | b364d9f9c693742f0ddcd9e64a9bbf9339b686d9 (diff) | |
download | cpython-06634950c553f8df83330ed468c11483b857b7dc.zip cpython-06634950c553f8df83330ed468c11483b857b7dc.tar.gz cpython-06634950c553f8df83330ed468c11483b857b7dc.tar.bz2 |
bpo-26762: Avoid daemon process in _test_multiprocessing (#2842)
test_level() of _test_multiprocessing._TestLogging now uses regular
processes rather than daemon processes to prevent zombi processes
(to not "leak" processes).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index a14fa74..88e2eb3 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -3469,16 +3469,18 @@ class _TestLogging(BaseTestCase): logger.setLevel(LEVEL1) p = self.Process(target=self._test_level, args=(writer,)) - p.daemon = True p.start() self.assertEqual(LEVEL1, reader.recv()) + p.join() + p.close() logger.setLevel(logging.NOTSET) root_logger.setLevel(LEVEL2) p = self.Process(target=self._test_level, args=(writer,)) - p.daemon = True p.start() self.assertEqual(LEVEL2, reader.recv()) + p.join() + p.close() root_logger.setLevel(root_level) logger.setLevel(level=LOG_LEVEL) |