RIATest Documentation Copyright © RIATest.com

Process Object

Process object is used to launch and/or terminate external processes.

Methods

MethodDescription

Process

Process(command,flag)
Create a Process object by executing specified command. If PROCESS_REDIRECT_CONSOLE flag is used the standard input/output streams of the process can be written/read by read/write functions. If process is created with flag PROCESS_REDIRECT_CONSOLE, detach() function cannot be used.

detach

detach()
Detach from the process. Detached processes are not automaticaly terminated on script end.Return true if successfuly detached. Does not work if the process is created with flag PROCESS_REDIRECT_CONSOLE.

getExitCode

getExitCode()
Return process exit code or false if the process is not yet terminated.

isRunning

isRunning()
Return true if the process running.

isTerminated

isTerminated()
Return true if the process started and terminated.

kill

kill()
Kill the process.

read

read()
Read string from process standard output stream. Return false if process is not launched with PROCESS_REDIRECT_CONSOLE flag or does not have standard output stream.

readError

readError()
Read string from process error output stream.

write

write(argument)
Write string to process standard input stream.

writeln

writeln(argument)
Write string with CR and/or LF to process standard input stream.