ProcessInfo Class Reference

#include <Pt/System/Process.h>

Process startup parameters

Public Types

enum  IOMode {
  Keep = 0,
  Close = 1,
  Redirect = 2,
  ToStdOut = 3
}
 Flags for process I/O. More...
 

Public Member Functions

 ProcessInfo (const Path &command)
 Construct with command to execute.
 
ProcessInfoaddArg (const std::string &argument)
 Adds an argument to the list of arguments.
 
const std::string & arg (std::size_t idx) const
 Returns a command line argument.
 
std::size_t argCount () const
 Number of command line arguments.
 
const Pathcommand () const
 Command to execute.
 
bool isDetached () const
 Returns true if process should detach.
 
bool isStdErrorAsOutput () const
 Returns true if stderr and atdout wil be combined.
 
bool isStdErrorClosed () const
 Returns true if stderr will be closed.
 
bool isStdErrorRedirected () const
 Returns true if stderr will be redirected.
 
bool isStdInputClosed () const
 Returns true if stdin will be closed.
 
bool isStdInputRedirected () const
 Returns true if stdin will be redirected.
 
bool isStdOutputClosed () const
 Returns true if stdout will be closed.
 
bool isStdOutputRedirected () const
 Returns true if stdout will be redirected.
 
void setDetached (bool sw)
 Process should detach.
 
void setStdError (IOMode mode)
 Sets I/O flags for stderr.
 
void setStdInput (IOMode mode)
 Sets I/O flags for stdin.
 
void setStdOutput (IOMode mode)
 Sets I/O flags for stdout.
 

Member Enumeration Documentation

enum IOMode
Enumerator
Keep 

Keep open.

Close 

Close I/O.

Redirect 

Redirect I/O.

ToStdOut 

Combine stderr with stdout, only valid for stderr.