59 G_EXCEPTION( Error ,
tx(
"invalid pid file") ) ;
113 static void create(
const Path & pid_file ) ;
119 bool m_committed{
false} ;
A Path object represents a file system path.
A class for creating pid files.
bool committed() const
Returns true if commit() has been called with a valid path().
void commit()
Creates the pid file if a path has been defined.
PidFile()
Default constructor.
~PidFile()
Destructor. Calls cleanup() to delete the file.
void mkdir()
Creates the directory if it does not already exist.
Path path() const
Returns the full path of the file.
static bool cleanup(SignalSafe, const char *path) noexcept
Deletes the specified pid file if it contains this process's id.
An empty structure that is used to indicate a signal-safe, reentrant implementation.
constexpr const char * tx(const char *p)
A briefer alternative to G::gettext_noop().