test_gipc.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:gipc 作者: jgehrcke 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号