os.py 文件源码

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

项目:Intranet-Penetration 作者: yuxiaokui 项目源码 文件源码
def nb_write(fd, buf):
        """Write bytes from buffer `buf` to file descriptor `fd`. Return the
        number of bytes written.

        The file descriptor must be in non-blocking mode.
        """
        hub, event = None, None
        while True:
            try:
                return _write(fd, buf)
            except OSError, e:
                if e.errno not in ignored_errors:
                    raise
                sys.exc_clear()
            if hub is None:
                hub = get_hub()
                event = hub.loop.io(fd, 2)
            hub.wait(event)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号