diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-12-15 18:24:02 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-12-15 18:24:02 +0000 |
| commit | faf8a3a3a9f2355ec7044144d63ef869788eebb3 (patch) | |
| tree | f8f1d22ceb1a04d44f2353fcc352fdeafeafbbad /cpp/src/qpid/sys/LockFile.h | |
| parent | a66973a94f41bc034d98d39028e13cbbff805b93 (diff) | |
| download | qpid-python-faf8a3a3a9f2355ec7044144d63ef869788eebb3.tar.gz | |
QPID-1951: Removed need for Windows versions of ssize_t and pid_t
- Trivially removed Windows uses of ssize_t
- Rearchitected how the Windows port finds an existing qpidd to stop it
- Split Posix Lockfile functionality using pids into a new PidFile class
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@890929 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/LockFile.h')
| -rw-r--r-- | cpp/src/qpid/sys/LockFile.h | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/cpp/src/qpid/sys/LockFile.h b/cpp/src/qpid/sys/LockFile.h index 1f0a9e13b3..14a76cbf3e 100644 --- a/cpp/src/qpid/sys/LockFile.h +++ b/cpp/src/qpid/sys/LockFile.h @@ -29,7 +29,7 @@ namespace qpid { namespace sys { -class LockFilePrivate; +class LockFilePrivate; /** * @class LockFile @@ -43,34 +43,17 @@ class LockFilePrivate; */ class LockFile : private boost::noncopyable { - boost::shared_ptr<LockFilePrivate> impl; - std::string path; bool created; + boost::shared_ptr<LockFilePrivate> impl; + +protected: + int read(void*, size_t) const; + int write(void*, size_t) const; public: QPID_COMMON_EXTERN LockFile(const std::string& path_, bool create); QPID_COMMON_EXTERN ~LockFile(); - - /** - * Read the process ID from the lock file. This method assumes that - * if there is a process ID in the file, it was written there by - * writePid(); thus, it's at the start of the file. - * - * Throws an exception if there is an error reading the file. - * - * @returns The stored process ID. No validity check is done on it. - */ - QPID_COMMON_EXTERN pid_t readPid(void) const; - - /** - * Write the current process's ID to the lock file. It's written at - * the start of the file and will overwrite any other content that - * may be in the file. - * - * Throws an exception if the write fails. - */ - QPID_COMMON_EXTERN void writePid(void); }; }} /* namespace qpid::sys */ |
