VICI  0.11.815
Visual Chart Interpreter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
VICI::cfi::ChildProcess Class Reference

Represents the state of a child process. More...

#include <vici/proc.h>

Inheritance diagram for VICI::cfi::ChildProcess:
VICI::cfi::AbstractChildProcess

Public Member Functions

 ChildProcess (const std::string &cmnd, int *fdin=nullptr, int *fdout=nullptr, int *fderr=nullptr)
 constructor More...
 
 ChildProcess ()
 constructor for fork
 
virtual ~ChildProcess ()
 destructor
 
virtual void setArgs (const std::vector< std::string > &args)
 set the args for the process More...
 
virtual void run ()
 start the command running
 
virtual void kill ()
 terminate the process
 
virtual int signal (int sig)
 send a signal to the process
 
virtual void finished (int result)
 set the exit status of the process More...
 
bool done ()
 get the running status of the program
 
virtual int getId ()
 get the process id
 
int getExitSignal ()
 get the signal that caused the process to exit.
 
int getExitStatus ()
 get the exit status
 
void reportExitErrors (bool x)
 turn on or off the reporting of error exits
 
- Public Member Functions inherited from VICI::cfi::AbstractChildProcess
virtual ~AbstractChildProcess ()
 Destructor.
 

Detailed Description

Represents the state of a child process.

Constructor & Destructor Documentation

ChildProcess::ChildProcess ( const std::string &  cmnd,
int *  fdin = nullptr,
int *  fdout = nullptr,
int *  fderr = nullptr 
)

constructor

Parameters
cmndthe command to run
fdinFile descriptor for stdin for the child
fdoutFile descriptor for stdout for the child
fderrFile descriptor for stderr for the child

Member Function Documentation

void ChildProcess::finished ( int  result)
virtual

set the exit status of the process

called by the process manager when the process exits

Parameters
resultthe exit status and code of the process

Implements VICI::cfi::AbstractChildProcess.

void ChildProcess::setArgs ( const std::vector< std::string > &  args)
virtual

set the args for the process

Parameters
argsthe args for the command

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