Remove CLockFile and let CFile do its job

This shouldn't contain any major behaviour change, but there are some minor
ones. Also, the API for a shared lock wasn't used and thus is dropped.

Thanks to cnu for this idea.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1337 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-01-20 13:21:29 +00:00
parent 6345ce12fa
commit 127347825e
5 changed files with 45 additions and 118 deletions
+7
View File
@@ -116,6 +116,10 @@ public:
void Close();
void ClearBuffer();
bool TryExLock(const CString& sLockFile, int iFlags = O_RDONLY);
bool TryExLock();
bool UnLock();
bool IsOpen() const;
CString GetLongName() const;
CString GetShortName() const;
@@ -123,6 +127,9 @@ public:
void SetFD(int iFD);
private:
// flock() wrapper
bool Lock(int iOperation);
CString m_sBuffer;
int m_iFD;