lock.py 文件源码

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

项目:TCP-IP 作者: JackZ0 项目源码 文件源码
def _try_lock(self, fd):
        """Try to acquire the lock file without blocking.

        :param int fd: file descriptor of the opened file to lock

        """
        try:
            fcntl.lockf(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
        except IOError as err:
            if err.errno in (errno.EACCES, errno.EAGAIN):
                logger.debug(
                    "A lock on %s is held by another process.", self._path)
                raise errors.LockError(
                    "Another instance of Certbot is already running.")
            raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号