def _lock_buildroot(self, exclusive):
lock_type = fcntl.LOCK_EX if exclusive else fcntl.LOCK_SH
if not self._lock_file:
self._open_lock()
try:
fcntl.lockf(self._lock_file.fileno(), lock_type | fcntl.LOCK_NB)
except IOError:
raise BuildRootLocked("Build root is locked by another process.")
评论列表
文章目录