diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-01-04 11:32:46 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-01-04 11:34:36 +0100 |
commit | 77ad443bd1a7f96271688efdcd9021a1cba64a46 (patch) | |
tree | 2d4258d93bd5aa0cb7f09f65149ff9881ee39a8b /src | |
parent | b8258a4475726b56a4caa6553568c67a343a091d (diff) |
~PathLocks(): Handle exceptions
Otherwise, since the call to write a "d" character to the lock file
can fail with ENOSPC, we can get an unhandled exception resulting in a
call to terminate().
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/pathlocks.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc index 1c87034f8..eddf5bcbd 100644 --- a/src/libstore/pathlocks.cc +++ b/src/libstore/pathlocks.cc @@ -161,7 +161,11 @@ bool PathLocks::lockPaths(const PathSet & _paths, PathLocks::~PathLocks() { - unlock(); + try { + unlock(); + } catch (...) { + ignoreException(); + } } |