| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# System::ProcessDescriptor::ProcessHandle Class Reference

List of all members.

## Detailed Description

Definition at line 111 of file ProcessDescriptor.h.

## Public Member Functions
| ProcessHandle (long pid)
virtual | ~ProcessHandle ()
long | item ()
void * | handle ()
## Private Attributes
void * | m_handle
bool | m_needRelease

## Constructor & Destructor Documentation

System::ProcessDescriptor::ProcessHandle::ProcessHandle | ( | long | pid | ) |

Definition at line 229 of file ProcessDescriptor.cpp.

References m_handle, m_needRelease, System::processHandle(), and s_myPid.

    00229                                                               {
    00230   if ( pid > 0 )    {
    00231     if ( pid != s_myPid )    {
    00232 #ifdef _WIN32
    00233       m_handle = ::OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ,FALSE,
    00234                                pid);
    00235 #else
    00236       m_handle = (void*)s_myPid;
    00237 #endif
    00238       m_needRelease = true;
    00239       return;
    00240     }
    00241   }
    00242   m_handle = processHandle();
    00243   m_needRelease = false;
    00244 }

System::ProcessDescriptor::ProcessHandle::~ProcessHandle | ( |  | ) | `[virtual]`

Definition at line 246 of file ProcessDescriptor.cpp.

References m_handle, and m_needRelease.

    00246                                                        {
    00247   if ( m_needRelease )    {
    00248 #ifdef _WIN32
    00249     ::CloseHandle(m_handle);
    00250 #else
    00251       m_handle = 0;
    00252 #endif
    00253   }
    00254 }

## Member Function Documentation

long System::ProcessDescriptor::ProcessHandle::item | ( |  | ) | `[inline]`

Definition at line 117 of file ProcessDescriptor.h.

References m_needRelease.

Referenced by System::ProcessDescriptor::query().

    00117                    {
    00118         return m_needRelease ? 1 : 0;
    00119       }

void* System::ProcessDescriptor::ProcessHandle::handle | ( |  | ) | `[inline]`

Definition at line 120 of file ProcessDescriptor.h.

References m_handle.

Referenced by System::ProcessDescriptor::query().

    00120                         {
    00121         return m_handle;
    00122       }

## Member Data Documentation

void* System::ProcessDescriptor::ProcessHandle::m_handle`[private]`

Definition at line 112 of file ProcessDescriptor.h.

Referenced by handle(), ProcessHandle(), and ~ProcessHandle().

bool System::ProcessDescriptor::ProcessHandle::m_needRelease`[private]`

Definition at line 113 of file ProcessDescriptor.h.

Referenced by item(), ProcessHandle(), and ~ProcessHandle().

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiKernel/v25r2/src/Lib/ProcessDescriptor.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiKernel/v25r2/src/Lib/ProcessDescriptor.cpp