11 #include <boost/shared_ptr.hpp>
45 PIDFile(
const std::string& filename);
69 void write(
int)
const;
88 std::string filename_;
void deleteFile() const
Delete the PID file.
int check() const
Read the PID in from the file and check it.
PIDCantReadPID(const char *file, size_t line, const char *what)
Exception thrown when an error occurs during PID file processing.
Class to help with processing PID files.
void write() const
Get PID of the current process and write it to the file.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
std::string getFilename() const
Returns the path to the PID file.
boost::shared_ptr< PIDFile > PIDFilePtr
Defines a shared pointer to a PIDFile.
PIDFile(const std::string &filename)
Constructor.
PIDFileError(const char *file, size_t line, const char *what)
Exception thrown when an error occurs trying to read a PID from an opened file.