diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-01-04 11:32:46 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-05-31 14:25:28 +0200 |
commit | 63a5be07e252904eeb83a88dce37008e1affec1a (patch) | |
tree | c8ada2537be124a5f22abd2e86ea4a3360867ed9 | |
parent | e08380fb6cefd3fd67c3c220a3ddaf385e6413cf (diff) | |
download | guix-63a5be07e252904eeb83a88dce37008e1affec1a.tar.gz guix-63a5be07e252904eeb83a88dce37008e1affec1a.zip |
daemon: ~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().
-rw-r--r-- | nix/libstore/pathlocks.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nix/libstore/pathlocks.cc b/nix/libstore/pathlocks.cc index 830858ff8d..9797ddd7ab 100644 --- a/nix/libstore/pathlocks.cc +++ b/nix/libstore/pathlocks.cc @@ -162,7 +162,11 @@ bool PathLocks::lockPaths(const PathSet & _paths, PathLocks::~PathLocks() { - unlock(); + try { + unlock(); + } catch (...) { + ignoreException(); + } } |