summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMaksym Telychko <maksym.telychko@globallogic.com>2020-03-24 17:41:04 +0200
committerMaksym Telychko <maksym.telychko@globallogic.com>2020-03-24 17:41:04 +0200
commitbab7e498b6dc31b6967a59fd728c5e5fe59d485c (patch)
tree06a0b7f76bbb9fe2f5c8428f7b6e00878cb433aa /include
parent36201df0d08daeeb64bb3923da789025a277a4ef (diff)
downloadlibmts-io-bab7e498b6dc31b6967a59fd728c5e5fe59d485c.tar.gz
libmts-io-bab7e498b6dc31b6967a59fd728c5e5fe59d485c.tar.bz2
libmts-io-bab7e498b6dc31b6967a59fd728c5e5fe59d485c.zip
MTX-3262 mpower: lockfile rewrite for interprocess communication safety
Previous implementation was not thread/interprocess safe due to pid management Fixes: Single instance guard.
Diffstat (limited to 'include')
-rw-r--r--include/mts/MTS_IO_LockFile.h6
1 files changed, 1 insertions, 5 deletions
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;
};
}