utils.py: lockfile(): Catch ENAMETOOLONG
PATCH 1/1 utils.py: lockfile(): Catch ENAMETOOLONG
From: Mark Hatle <[email protected]>
When the filename was too long, the system would loop forever causing a hang. Instead we need to just drop out, as we can't correct a filename that is too long.
Signed-off-by Mark Hatle <[email protected]>
Signed-off-by Mark Hatle <[email protected]>
--- lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/utils.py +1 -1
@@ -487,7 +487,7 @@ def lockfile(name, shared=False, retry=True, block=False): return lf lf.close() except OSError as e: - if e.errno == errno.EACCES: + if e.errno == errno.EACCES or e.errno == errno.ENAMETOOLONG: logger.error("Unable to acquire lock '%s', %s", e.strerror, name) sys.exit(1)
Signature · 1 line
1.8.3.1