aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/utils/posix.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/utils/posix.py b/mesonbuild/utils/posix.py
index 161e8fc..51c3cd0 100644
--- a/mesonbuild/utils/posix.py
+++ b/mesonbuild/utils/posix.py
@@ -34,6 +34,9 @@ class BuildDirLock(BuildDirLockBase):
except (BlockingIOError, PermissionError):
self.lockfile.close()
raise MesonException('Some other Meson process is already using this build directory. Exiting.')
+ except OSError as e:
+ self.lockfile.close()
+ raise MesonException(f'Failed to lock the build directory: {e.strerror}')
def __exit__(self, *args: T.Any) -> None:
fcntl.flock(self.lockfile, fcntl.LOCK_UN)