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/windows/LockFile.cpp | |
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/windows/LockFile.cpp')
-rwxr-xr-x | cpp/src/qpid/sys/windows/LockFile.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/cpp/src/qpid/sys/windows/LockFile.cpp b/cpp/src/qpid/sys/windows/LockFile.cpp index e9079b6094..e9fe01ca72 100755 --- a/cpp/src/qpid/sys/windows/LockFile.cpp +++ b/cpp/src/qpid/sys/windows/LockFile.cpp @@ -56,29 +56,4 @@ LockFile::~LockFile() { } } -pid_t LockFile::readPid(void) const { - if (!impl) - throw Exception("Lock file not open"); - - pid_t pid; - DWORD desired_read = sizeof(pid_t); - DWORD actual_read = 0; - if (!ReadFile(impl->fd, &pid, desired_read, &actual_read, 0)) { - throw Exception("Cannot read lock file " + path); - } - return pid; -} - -void LockFile::writePid(void) { - if (!impl) - throw Exception("Lock file not open"); - - pid_t pid = GetCurrentProcessId(); - DWORD desired_write = sizeof(pid_t); - DWORD written = 0; - if (!WriteFile(impl->fd, &pid, desired_write, &written, 0)) { - throw Exception("Cannot write lock file " + path); - } -} - }} /* namespace qpid::sys */ |