diff options
| author | Martin Ridgers <[email protected]> | 2021-11-30 16:25:31 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-12-02 11:35:46 +0100 |
| commit | 71a5ab8781a596daad70eef596e8fdc2f0a5f818 (patch) | |
| tree | bc4bc233ef3a3c4d4b9016cbedfe00b552d0cbe8 /zenstore/basicfile.cpp | |
| parent | Renamed ZEN_PLATFORM_MACOS to ZEN_PLATFORM_MAC (diff) | |
| download | zen-71a5ab8781a596daad70eef596e8fdc2f0a5f818.tar.xz zen-71a5ab8781a596daad70eef596e8fdc2f0a5f818.zip | |
Remove a LockFile's lock on destruction
Diffstat (limited to 'zenstore/basicfile.cpp')
| -rw-r--r-- | zenstore/basicfile.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 |