12#include <boost/noncopyable.hpp>
16#include <boost/shared_ptr.hpp>
30class ProcessSpawnImpl;
73 const std::string& executable,
76 const bool inherit_env =
false);
91 const bool inherit_env =
false);
112 pid_t
spawn(
bool dismiss =
false);
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Exception thrown when error occurs during spawning a process.
ProcessSpawnError(const char *file, size_t line, const char *what)
Utility class for spawning new processes.
bool isAnyRunning() const
Checks if any of the spawned processes is still running.
int getExitStatus(const pid_t pid) const
Returns exit status of the process.
void clearState(const pid_t pid)
Removes the status of the process with a specified PID.
bool isRunning(const pid_t pid) const
Checks if the process is still running.
std::string getCommandLine() const
Returns full command line, including arguments, for the process.
~ProcessSpawn()=default
Destructor.
pid_t spawn(bool dismiss=false)
Spawn the new process.
A wrapper interface for the ASIO library.
std::vector< std::string > ProcessArgs
Type of the container holding arguments of the executable being run as a background process.
std::vector< std::string > ProcessEnvVars
Type of the container holding environment variables of the executable being run as a background proce...
boost::shared_ptr< ProcessSpawnImpl > ProcessSpawnImplPtr
Pointer to a ProcessSpawnImpl class.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
Defines the logger used by the top-level component of kea-lfc.