1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

openLockFile: Return an AutoCloseFD

This commit is contained in:
Eelco Dolstra 2017-01-25 12:51:35 +01:00
parent c0f2f4eeef
commit a55f589720
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 7 additions and 7 deletions

View file

@ -13,7 +13,7 @@
namespace nix {
int openLockFile(const Path & path, bool create)
AutoCloseFD openLockFile(const Path & path, bool create)
{
AutoCloseFD fd;
@ -21,7 +21,7 @@ int openLockFile(const Path & path, bool create)
if (!fd && (create || errno != ENOENT))
throw SysError(format("opening lock file %1%") % path);
return fd.release();
return fd;
}