Logo Search packages:      
Sourcecode: launchtool version File versions  Download package

Pidfile Class Reference

#include <Pidfile.h>

List of all members.


Detailed Description

Encapsulates the handling of a pid file.

Pidfile provides all functions required to manage a pidfile. If the pid directory has not been specified, pidfiles are read, written and created in the directory PID_DIR

Definition at line 13 of file Pidfile.h.


Public Member Functions

bool is_active () throw (FileException)
 Check if the pid contained in the pid_file corresponds to a running process.
bool kill (int sig) throw (SystemException)
 Pidfile (const std::string &tag, const std::string &dir="")
 Construct the pidfile manager for (dir or PID_DIR)/<tag>.pid.
pid_t read () throw (FileException)
 Read the content of the pid file.
void remove () throw (FileException)
 Delete the pidfile.
void takeover (pid_t pid) throw (FileException)
 Write the specified pid in the file, and set the file to be deleted on class destruction.
void takeover () throw (FileException)
 Write the current pid in the file, and set the file to be deleted on class destruction.
 ~Pidfile ()
 Delete the pidfile if takeover was previously invoked.

Protected Attributes

bool delete_on_exit
std::string name

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

Generated by  Doxygen 1.6.0   Back to index