def test_early_readchild_exit_write_from_child(self):
pr = start_process(ipc_readonce_then_exit, (self.rh,))
pw = start_process(ipc_endless_write_for_early_reader_exit, (self.wh,))
# This test is to make sure equivalent behavior as in test
# `test_early_readchild_exit` when the writing process is a
# child process itself (above, the write process in the initial
# process). Since gipc's child process creation
# routine messes around with signal handlers, this test makes
# sure that SIGPIPE is ignored in the child and that a
# failing write attempt (after early read child exit) results
# in an exception raised in the writing process.
pr.join()
pw.join()
assert pr.exitcode == 0
assert pw.exitcode == 0
self.rh2.close()
self.wh2.close()
评论列表
文章目录