Process Class Reference

#include <Pt/System/Process.h>

Executes shell commands.

Inherits NonCopyable.

Public Types

enum  State {
  Ready = 0,
  Running = 1,
  Finished = 2,
  Failed = 3
}
 State of the process. More...
 

Public Member Functions

 Process (const ProcessInfo &procInfo)
 Constructs with a process parameters.
 
 ~Process ()
 Destructor.
 
const ProcessInfoprocInfo () const
 Returns the process parameters.
 
State state () const
 Returns the current state.
 
void start ()
 Start/Create the Process. More...
 
void kill ()
 Kills the Process. More...
 
int wait ()
 Waits until the Process ends. More...
 
IODevicestdInput ()
 Returns an I/O device to stdin.
 
IODevicestdOutput ()
 Returns an I/O device to stdout.
 
IODevicestdError ()
 Returns an I/O device to stderr.
 

Member Enumeration Documentation

◆ State

enum State
Enumerator
Ready 

Ready to run.

Running 

Currently running.

Finished 

Finished to run.

Failed 

Execution has failed.

Member Function Documentation

◆ start()

void start ( )
Exceptions
SystemError

◆ kill()

void kill ( )
Exceptions
SystemError

◆ wait()

int wait ( )