diff options
Diffstat (limited to 'src/libstore/pathlocks.hh')
-rw-r--r-- | src/libstore/pathlocks.hh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstore/pathlocks.hh b/src/libstore/pathlocks.hh index 7fcfa2e40..d06d031b5 100644 --- a/src/libstore/pathlocks.hh +++ b/src/libstore/pathlocks.hh @@ -49,8 +49,12 @@ struct FdLock ~FdLock() { - if (acquired) - lockFile(fd, ltNone, false); + try { + if (acquired) + lockFile(fd, ltNone, false); + } catch (SysError &) { + ignoreException(); + } } }; |