Portable process status. More...
#include <Process.hpp>
Classes | |
struct | Repr |
Public Member Functions | |
Status (ProcId wpid, int status) | |
Status (int rep1, int rep2, Repr) | |
Status () | |
bool | running () const |
bool | exitTerminated () const |
int | exitStatus () const |
bool | terminatedSuccessfully () const |
bool | signalTerminated () const |
bool | terminated () const |
int | termSignal () const |
bool | stopped () const |
int | stopSignal () const |
String | toString () const |
Get a string representation of the status suitable for debugging or logging. | |
int | getPOSIXwaitpidStatus () const |
Get the result from waitpid(). | |
void | repr (int &rep1, int &rep2) const |
Private Attributes | |
bool | m_status_available |
int | m_status |
Portable process status.
Definition at line 122 of file Process.hpp.
BLOCXX_NAMESPACE::Process::Status::Status | ( | ProcId | wpid, | |
int | status | |||
) |
running()
, stopped()
and terminated()
is true.wpid | return value from waitpid | |
status | status value assigned by waitpid . |
Definition at line 73 of file Process.cpp.
BLOCXX_NAMESPACE::Process::Status::Status | ( | int | rep1, | |
int | rep2, | |||
Repr | ||||
) |
Definition at line 79 of file Process.cpp.
References BLOCXX_NAMESPACE::BLOCXX_DEFINE_EXCEPTION(), BLOCXX_GLOBAL_STRING_INIT, BLOCXX_NAMESPACE::FileSystem::COMPONENT_NAME, exitStatus(), exitTerminated(), m_status, BLOCXX_NAMESPACE::pollStatusImpl(), running(), Status(), BLOCXX_NAMESPACE::TERM_MESSAGE, and terminated().
BLOCXX_NAMESPACE::Process::Status::Status | ( | ) |
int BLOCXX_NAMESPACE::Process::Status::exitStatus | ( | ) | const |
exitTerminated()
exit()
or returned from main()
. Definition at line 157 of file Process.cpp.
Referenced by Status().
bool BLOCXX_NAMESPACE::Process::Status::exitTerminated | ( | ) | const |
Definition at line 152 of file Process.cpp.
Referenced by Status().
int BLOCXX_NAMESPACE::Process::Status::getPOSIXwaitpidStatus | ( | ) | const |
Get the result from waitpid().
Definition at line 162 of file Process.cpp.
void BLOCXX_NAMESPACE::Process::Status::repr | ( | int & | rep1, | |
int & | rep2 | |||
) | const |
Definition at line 189 of file Process.cpp.
bool BLOCXX_NAMESPACE::Process::Status::running | ( | ) | const |
Definition at line 142 of file Process.cpp.
Referenced by Status().
bool BLOCXX_NAMESPACE::Process::Status::signalTerminated | ( | ) | const |
Definition at line 167 of file Process.cpp.
bool BLOCXX_NAMESPACE::Process::Status::stopped | ( | ) | const |
Definition at line 177 of file Process.cpp.
References m_status, and m_status_available.
int BLOCXX_NAMESPACE::Process::Status::stopSignal | ( | ) | const |
stopped()
Definition at line 182 of file Process.cpp.
References m_status, and m_status_available.
bool BLOCXX_NAMESPACE::Process::Status::terminated | ( | ) | const |
Definition at line 147 of file Process.cpp.
Referenced by BLOCXX_NAMESPACE::Process::err(), and Status().
bool BLOCXX_NAMESPACE::Process::Status::terminatedSuccessfully | ( | ) | const |
Definition at line 195 of file Process.cpp.
References m_status, and m_status_available.
int BLOCXX_NAMESPACE::Process::Status::termSignal | ( | ) | const |
signalTerminated()
Definition at line 172 of file Process.cpp.
References m_status_available.
String BLOCXX_NAMESPACE::Process::Status::toString | ( | ) | const |
Get a string representation of the status suitable for debugging or logging.
Definition at line 200 of file Process.cpp.
References m_status.
int BLOCXX_NAMESPACE::Process::Status::m_status [private] |
Definition at line 199 of file Process.hpp.
Referenced by Status(), stopped(), stopSignal(), terminatedSuccessfully(), and toString().
bool BLOCXX_NAMESPACE::Process::Status::m_status_available [private] |
Definition at line 198 of file Process.hpp.
Referenced by stopped(), stopSignal(), terminatedSuccessfully(), and termSignal().