From 620bd2637b40d718dd5886ce7df0a19b73ea8875 Mon Sep 17 00:00:00 2001 From: Maksym Telychko Date: Tue, 24 Mar 2020 17:41:04 +0200 Subject: MTX-3262 mpower: lockfile rewrite for interprocess communication safety Previous implementation was not thread/interprocess safe due to pid management Fixes: Single instance guard. --- include/mts/MTS_IO_LockFile.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include/mts/MTS_IO_LockFile.h') diff --git a/include/mts/MTS_IO_LockFile.h b/include/mts/MTS_IO_LockFile.h index 730cf3c..22e641b 100644 --- a/include/mts/MTS_IO_LockFile.h +++ b/include/mts/MTS_IO_LockFile.h @@ -34,11 +34,8 @@ namespace MTS { namespace IO { - class LockFile : MTS::NonCopyable { - public: - LockFile(const std::string& sFilePath); virtual ~LockFile(); @@ -46,11 +43,10 @@ namespace MTS { void unlock(); bool isLocked(); - protected: - private: std::string m_sFile; int m_iLockFd; + int m_iLockErr; }; } -- cgit v1.2.3