| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# System::ProcessDescriptor::ProcessHandle Class Reference

List of all members.

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

## Detailed Description

Definition at line 111 of file ProcessDescriptor.h.

## Constructor & Destructor Documentation

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

Definition at line 231 of file ProcessDescriptor.cpp.

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

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

Definition at line 248 of file ProcessDescriptor.cpp.

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

## Member Function Documentation

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

Definition at line 120 of file ProcessDescriptor.h.

    00120                         {
    00121         return m_handle;
    00122       }

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

Definition at line 117 of file ProcessDescriptor.h.

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

## 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_v22r0/GaudiKernel/src/Lib/ProcessDescriptor.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r0/GaudiKernel/src/Lib/ProcessDescriptor.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines