OW_NAMESPACE::PidFile Namespace Reference


Functions

int readPid (const char *pidfile)
 Read the contents of a pid file and return the results.
int checkPid (const char *pidfile)
 Ensure the pid file corresponds to a currently running process.
int writePid (const char *pidfile)
 Writes the pid to the specified file.
int removePid (const char *pidfile)
 Remove a pid file.


Function Documentation

int OW_NAMESPACE::PidFile::checkPid const char *  pidfile  ) 
 

Ensure the pid file corresponds to a currently running process.

Parameters:
pidfile The fully qualified path to the pid file.
Returns:
The process id on success. Otherwise -1

Definition at line 78 of file OW_PidFile.cpp.

References readPid().

int OW_NAMESPACE::PidFile::readPid const char *  pidfile  ) 
 

Read the contents of a pid file and return the results.

Parameters:
pidfile The fully qualified path to the pid file.
Returns:
The process id on success. Otherwise -1

Definition at line 62 of file OW_PidFile.cpp.

Referenced by checkPid().

int OW_NAMESPACE::PidFile::removePid const char *  pidfile  ) 
 

Remove a pid file.

Returns:
The results of the unlink call.

Definition at line 141 of file OW_PidFile.cpp.

References OW_NAMESPACE::FileSystem::removeFile().

Referenced by OW_NAMESPACE::Platform::daemonShutdown().

int OW_NAMESPACE::PidFile::writePid const char *  pidfile  ) 
 

Writes the pid to the specified file.

Parameters:
pidfile The fully qualified path to the pid file
Returns:
The process id on success. Otherwise -1 and errno is set to the error encountered by this function

Definition at line 96 of file OW_PidFile.cpp.

References OW_NAMESPACE::FileSystem::close(), and OW_NAMESPACE::File::tryLock().


Generated on Thu Feb 9 09:18:00 2006 for openwbem by  doxygen 1.4.6