All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] utils.py: lockfile(): Catch ENAMETOOLONG
@ 2021-11-13 17:58 Mark Hatle
  0 siblings, 0 replies; only message in thread
From: Mark Hatle @ 2021-11-13 17:58 UTC (permalink / raw)
  To: bitbake-devel

From: Mark Hatle <mark.hatle@xilinx.com>

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 <mark.hatle@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
 lib/bb/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 7063491..0343b08 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -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)
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-13 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-13 17:58 [PATCH] utils.py: lockfile(): Catch ENAMETOOLONG Mark Hatle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.