test_proxy.py 文件源码

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

项目:remote-docker 作者: phizaz 项目源码 文件源码
def spawn(self, argv):
        '''
        Create a spawned process.
        Based on the code for pty.spawn().
        '''
        assert self.master_fd is None
        assert isinstance(argv, list)

        pid, master_fd = pty.fork()
        self.master_fd = master_fd

        if pid == pty.CHILD:
            os.execlp(argv[0], *argv)  # and not ever returned

        self._init()
        try:
            self._copy()  # start communication
        except Exception:
            # unexpected errors
            self._del()
            raise
        self._del()

        return self.log.decode()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号