From 71a5ab8781a596daad70eef596e8fdc2f0a5f818 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Tue, 30 Nov 2021 16:25:31 +0100 Subject: Remove a LockFile's lock on destruction --- zenstore/basicfile.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'zenstore/basicfile.cpp') diff --git a/zenstore/basicfile.cpp b/zenstore/basicfile.cpp index 938c0f9e2..413c78674 100644 --- a/zenstore/basicfile.cpp +++ b/zenstore/basicfile.cpp @@ -334,6 +334,12 @@ LockFile::LockFile() LockFile::~LockFile() { +#if ZEN_PLATFORM_LINUX + int Fd = int(intptr_t(m_FileHandle)); + flock(Fd, LOCK_UN|LOCK_NB); +#elif ZEN_PLATFORM_MAC +# error check flock() support +#endif } void -- cgit v1.2.3