| # Gaudi Framework, version v21r6 |

Home |  | Generated: 11 Nov 2009

# 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.

    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.

    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.

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

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

Definition at line 120 of file ProcessDescriptor.h.

    00120                         {
    00121         return m_handle;
    00122       }

## Member Data Documentation

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

Definition at line 112 of file ProcessDescriptor.h.

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

Definition at line 113 of file ProcessDescriptor.h.

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

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