The Process class is used to launch an external process. Processes can be instantiated in the scripting environment.
More...
#include <processinterface.h>
|
int | launch () |
| Launch process.
|
|
int | launchAndDetach () |
| Launch process and detach it from application.
|
|
String | commandLine () |
| Fetch command line to be executed in this process.
|
|
int | errorCode () |
| Fetch error code.
|
|
String & | errorMessage () |
| Fetch error message.
|
|
void | terminate () |
| Terminate process.
|
|
bool | isAlive () |
| Verify if process is still alive.
|
|
int | pid () |
| Fetch process PID.
|
|
The Process class is used to launch an external process. Processes can be instantiated in the scripting environment.
You can use it in both Script Editor and scriptModule.
p1 =
new Process(
"rndr -t file.rib" );
p2 =
new Process(
"rndr",
"-t",
"file.rib" );
p1.launch();
p2.launch();
p3 =
new Process(
"rndr -t file.rib" );
p3.launchAndDetach();
if ( p4.isAlive() )
{
p4.terminate();
}
Process::Process |
( |
int |
pid | ) |
|
Create a new Process. A process created with a pid cannot be launched as it already should have been. terminate() and isAlive() functions can still be called with such a process.
- Parameters
-
int | PID of already existing process. |
Process::Process |
( |
String |
name, |
|
|
|
... |
|
) |
| |
Create a new Process.
- Parameters
-
name | Path or name of process to execute |
... | List of arguments |
Process::Process |
( |
String |
name, |
|
|
StringList |
list |
|
) |
| |
Create a new Process.
- Parameters
-
name | Path or name of process to execute |
list | List of arguments |
Process::Process |
( |
String |
commandLine | ) |
|
Create a new Process.
- Parameters
-
commandLine | Entire command line to launch |
String Process::commandLine |
( |
| ) |
|
|
slot |
Fetch command line to be executed in this process.
- Returns
- command line in a single string
int Process::errorCode |
( |
| ) |
|
|
slot |
Fetch error code.
- Returns
- error code, zero if none
String& Process::errorMessage |
( |
| ) |
|
|
slot |
Fetch error message.
- Returns
- error message associated to error code, empty string if none
bool Process::isAlive |
( |
| ) |
|
|
slot |
Verify if process is still alive.
- Returns
- state of process, true if it can be reached
Launch process.
- Returns
- error code, zero if none
int Process::launchAndDetach |
( |
| ) |
|
|
slot |
Launch process and detach it from application.
- Returns
- error code, zero if none
Fetch process PID.
- Returns
- pid, -1 if no process started
void Process::terminate |
( |
| ) |
|
|
slot |
The documentation for this class was generated from the following file: