libcommonc++  0.7
ExitStatus Class Reference

The exit status of a process. More...

#include <Process.h++>

Public Member Functions

 ExitStatus ()
 Construct a new ExitStatus. More...
 
 ~ExitStatus ()
 Destructor. More...
 
int getExitCode () const
 Get the exit code from the process. More...
 
int getExitSignal () const
 Get the exit signal. More...
 
bool isNormal () const
 Determine if the process exited normally. More...
 
uint64_t getUserTime () const
 Get the total amount of user-space time, in milliseconds, that the process consumed. More...
 
uint64_t getKernelTime () const
 Get the total amount of kernel-space time, in milliseconds, that the process consumed. More...
 
uint_t getMaxRSS () const
 Get the process's maximum resident set size, in pages. More...
 

Static Public Attributes

static const int SigAbort = SIGABRT
 Signal indicating the process was aborted. More...
 
static const int SigFloatingPointException = SIGFPE
 Signal indicating the process encountered a floating-point exception (such as division by zero). More...
 
static const int SigIllegalInstruction = SIGILL
 Signal indicating the process encountered an illegal machine instruction. More...
 
static const int SigKeyboardInterrupt = SIGINT
 Signal indicating the process received a keyboard interrupt (Control-C). More...
 
static const int SigSegmentationFault = SIGSEGV
 Signal indicating the process attempted an illegal memory access. More...
 
static const int SigTerminationRequest = SIGTERM
 Signal indicating the process received a termination request. More...
 
static const int SUCCESS = EXIT_SUCCESS
 The platform's default "success" exit status. More...
 
static const int FAILURE = EXIT_FAILURE
 The platform's default "failure" exit status. More...
 

Friends

class Process
 

Detailed Description

The exit status of a process.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ ExitStatus()

ExitStatus ( )
inline

Construct a new ExitStatus.

◆ ~ExitStatus()

~ExitStatus ( )
inline

Destructor.

Member Function Documentation

◆ getExitCode()

int getExitCode ( ) const
inline

Get the exit code from the process.

◆ getExitSignal()

int getExitSignal ( ) const
inline

Get the exit signal.

Returns
The signal number that caused the process to exit, or 0 if the process did not exit due to a signal.

◆ getKernelTime()

uint64_t getKernelTime ( ) const
inline

Get the total amount of kernel-space time, in milliseconds, that the process consumed.

◆ getMaxRSS()

uint_t getMaxRSS ( ) const
inline

Get the process's maximum resident set size, in pages.

This information is not available on some systems (e.g., it is always 0 on Linux).

◆ getUserTime()

uint64_t getUserTime ( ) const
inline

Get the total amount of user-space time, in milliseconds, that the process consumed.

◆ isNormal()

bool isNormal ( ) const
inline

Determine if the process exited normally.

Friends And Related Function Documentation

◆ Process

friend class Process
friend

Member Data Documentation

◆ FAILURE

const int FAILURE = EXIT_FAILURE
static

The platform's default "failure" exit status.

◆ SigAbort

const int SigAbort = SIGABRT
static

Signal indicating the process was aborted.

◆ SigFloatingPointException

const int SigFloatingPointException = SIGFPE
static

Signal indicating the process encountered a floating-point exception (such as division by zero).

◆ SigIllegalInstruction

const int SigIllegalInstruction = SIGILL
static

Signal indicating the process encountered an illegal machine instruction.

◆ SigKeyboardInterrupt

const int SigKeyboardInterrupt = SIGINT
static

Signal indicating the process received a keyboard interrupt (Control-C).

◆ SigSegmentationFault

const int SigSegmentationFault = SIGSEGV
static

Signal indicating the process attempted an illegal memory access.

◆ SigTerminationRequest

const int SigTerminationRequest = SIGTERM
static

Signal indicating the process received a termination request.

◆ SUCCESS

const int SUCCESS = EXIT_SUCCESS
static

The platform's default "success" exit status.


The documentation for this class was generated from the following files: