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.
 
void kill ()
 Kills the Process. More...
 
const ProcessInfoprocInfo () const
 Returns the process parameters.
 
void start ()
 Start/Create the Process. More...
 
State state () const
 Returns the current state.
 
IODevicestdError ()
 Returns an I/O device to stderr.
 
IODevicestdInput ()
 Returns an I/O device to stdin.
 
IODevicestdOutput ()
 Returns an I/O device to stdout.
 
int wait ()
 Waits until the Process ends. More...
 

Member Enumeration Documentation

enum State
Enumerator
Ready 

Ready to run.

Running 

Currently running.

Finished 

Finished to run.

Failed 

Execution has failed.

Member Function Documentation

void start ( )
Exceptions
SystemError
void kill ( )
Exceptions
SystemError
int wait ( )