Process Class

A class for executing a process and reading and writing its standard output, input and error.

This process test example shows how to start a process using the Process class and read its standard output and error.

Definition

Line 10 of System.Base/Process.cm

Constructors & Destructor

public Process(const String<char>& command, Redirections redirections_)
public ~Process()

Member Functions

public bool Eof(StdHandle handle)
public int ExitCode()
public String<char> ReadLine(StdHandle handle)
public String<char> ReadToEnd(StdHandle handle)
public bool Running()
public void Terminate()
public void WaitForExit()
public void WriteLine(const String<char>& line)

Enumerated Types

public enum Redirections
public enum StdHandle

Member Variables

private void* nativeProcess
private Redirections redirections

Constructor& Destructor Details

Process Constructor

public Process(const String<char>& command, Redirections redirections_)

Definition
Line 23 of System.Base/Process.cm


~Process Destructor

public ~Process()

Definition
Line 34 of System.Base/Process.cm


Member Function Details

Eof Member Function

public bool Eof(StdHandle handle)

Definition
Line 92 of System.Base/Process.cm


ExitCode Member Function

public int ExitCode()

Definition
Line 67 of System.Base/Process.cm


ReadLine Member Function

public String<char> ReadLine(StdHandle handle)

Definition
Line 104 of System.Base/Process.cm


ReadToEnd Member Function

public String<char> ReadToEnd(StdHandle handle)

Definition
Line 118 of System.Base/Process.cm


Running Member Function

public bool Running()

Definition
Line 41 of System.Base/Process.cm


Terminate Member Function

public void Terminate()

Definition
Line 79 of System.Base/Process.cm


WaitForExit Member Function

public void WaitForExit()

Definition
Line 56 of System.Base/Process.cm


WriteLine Member Function

public void WriteLine(const String<char>& line)

Definition
Line 132 of System.Base/Process.cm