From faf8a3a3a9f2355ec7044144d63ef869788eebb3 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 15 Dec 2009 18:24:02 +0000 Subject: 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 --- cpp/src/qpid/sys/windows/LockFile.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'cpp/src/qpid/sys/windows') 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 */ -- cgit v1.2.1