34#ifndef BLOCXX_PROCESS_HPP_INCLUDE_GUARD_
35#define BLOCXX_PROCESS_HPP_INCLUDE_GUARD_
41#include "blocxx/BLOCXX_config.h"
146 bool running()
const;
150 bool exitTerminated()
const;
157 int exitStatus()
const;
161 bool terminatedSuccessfully()
const;
165 bool signalTerminated()
const;
169 bool terminated()
const;
174 int termSignal()
const;
178 bool stopped()
const;
183 int stopSignal()
const;
193 int getPOSIXwaitpidStatus()
const;
195 void repr(
int & rep1,
int & rep2)
const;
214 E_TERMINATE_PROCESS_ONLY
239 const Timeout& wait_initial = Timeout::relative(5.0),
240 const Timeout& wait_close = Timeout::relative(10.0),
241 const Timeout& wait_term = Timeout::relative(15.0),
242 ETerminationSelectionFlag terminationSelectionFlag = E_TERMINATE_PROCESS_GROUP);
266 void waitCloseTerm(
float wait_initial,
float wait_close,
float wait_term);
269 bool terminatesWithin(
const Timeout& wait_time);
273 bool terminateByMessage(
const Timeout& waitTime);
274 bool killProcess(
const Timeout& waitTime, ETerminationSelectionFlag terminationSelectionFlag);
276 bool killWait(
const Timeout& wait_time,
int sig,
char const * signame, ETerminationSelectionFlag terminationSelectionFlag);
#define BLOCXX_DECLARE_EXCEPTION(NAME)
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typical...
Class for communicating with and managing a child process.
ETerminationSelectionFlag
@ E_TERMINATE_PROCESS_GROUP
The process and any descendent processes which are in the process group will be terminated.
Process(Process const &)
Copying not allowed (private)
void operator=(Process const &)
Assignment not allowed (private)
Abstract interface for abstracting details of dealing with a process.
virtual Process::Status pollStatus(ProcId pid)=0
virtual int kill(ProcId pid, int sig)=0
Sends signal sig to process pid.
This String class is an abstract data type that represents as NULL terminated string of characters.
A timeout can be absolute, which means that it will happen at the specified DateTime.
IntrusiveReference< ProcessImpl > ProcessImplRef