28 #include <sys/types.h>
58 G_EXCEPTION( Error ,
"invalid pid file" ) ;
80 void init(
const Path & pid_file_path ) ;
113 void operator=(
const PidFile & ) ;
114 static bool mine(
SignalSafe ,
const char * path ) ;
115 static void create(
const Path & pid_file ) ;
void init(const Path &pid_file_path)
Used after default construction to make the object active.
void check()
Throws an exception if the path is not absolute.
An empty structure that is used to indicate a signal-safe, reentrant implementation.
Path path() const
Returns the path as supplied to the constructor or init().
~PidFile()
Destructor. Calls cleanup() to delete the file.
PidFile()
Default constructor.
static void cleanup(SignalSafe, const char *path)
Deletes the specified pid file if it contains this process's id.
void commit()
Creates the file and installs signal handlers to cleanup() the file on abnormal process termination...
A class for creating pid files.
A Path object represents a file system path.