(self)
| 5526 | conn.close() |
| 5527 | |
| 5528 | def test_lock(self): |
| 5529 | r, w = multiprocessing.Pipe(False) |
| 5530 | l = util.ForkAwareThreadLock() |
| 5531 | old_size = len(util._afterfork_registry) |
| 5532 | p = multiprocessing.Process(target=self.child, args=(5, w)) |
| 5533 | p.start() |
| 5534 | w.close() |
| 5535 | new_size = r.recv() |
| 5536 | join_process(p) |
| 5537 | self.assertLessEqual(new_size, old_size) |
| 5538 | |
| 5539 | # |
| 5540 | # Check that non-forked child processes do not inherit unneeded fds/handles |
nothing calls this directly
no test coverage detected