High level API to create and manage a processes.
More...
#include <Process.hpp>
|
| Process (void) |
| Constructs an Process instance.
|
|
| Process (const Process &arg)=delete |
| Copy contructor.
|
|
Process & | operator= (const Process &arg)=delete |
| Assignment operator.
|
|
| ~Process (void) |
| Destructs this instance and frees all resouces.
|
|
void | Start (const String &workingDirectory, const String &path, const String &commandLineArgs="") |
| Starts a new separate process. More...
|
|
void | Start (const String &workingDirectory, const String &path, const String &commandLineArgs, const ProcessConfiguration &processConfiguration) |
| Starts a new separate process. More...
|
|
int | StartBlocking (const String &workingDirectory, const String &path, const String &commandLineArgs, int &exitStatus) |
| Starts a new separate process. And waits until the child process exits More...
|
|
void | StartDaemon (const String &workingDirectory, const String &path, const String &commandLineArgs="") |
| Starts a new separate process as a daemon More...
|
|
void | Kill (void) |
| Posts a kill request to this process.
|
|
bool | HasExited (void) const |
| Checks if the process has terminated. More...
|
|
void | DetermineCurrentProcess (void) |
| Determines the information for the current process.
|
|
int32 | GetId (void) const |
| Retrieves ID of the process More...
|
|
|
static void | SetupCurrentProcess (int core=-1) |
| - Parameters
-
core | The core to bind the current process to, -1 means not set. |
|
|
static String | GetCurrentFileName (void) |
| Returns the full qualified filename of the executable of the current process. More...
|
|
static int32 | GetCurrentProcessId (void) |
| Gets the ID of the current process. More...
|
|
High level API to create and manage a processes.
◆ GetCurrentFileName()
String Arp::System::Commons::Runtime::Process::GetCurrentFileName |
( |
void |
| ) |
|
|
static |
Returns the full qualified filename of the executable of the current process.
- Returns
- Filename of current process.
◆ GetCurrentProcessId()
int32 Arp::System::Commons::Runtime::Process::GetCurrentProcessId |
( |
void |
| ) |
|
|
static |
Gets the ID of the current process.
- Returns
- The ID of the current process.
◆ GetId()
int32 Arp::System::Commons::Runtime::Process::GetId |
( |
void |
| ) |
const |
Retrieves ID of the process
- Returns
- Process ID
◆ HasExited()
bool Arp::System::Commons::Runtime::Process::HasExited |
( |
void |
| ) |
const |
Checks if the process has terminated.
- Returns
- True if process is not running any more, otherwise false is returned.
◆ Start() [1/2]
void Arp::System::Commons::Runtime::Process::Start |
( |
const String & |
workingDirectory, |
|
|
const String & |
path, |
|
|
const String & |
commandLineArgs, |
|
|
const ProcessConfiguration & |
processConfiguration |
|
) |
| |
Starts a new separate process.
- Parameters
-
workingDirectory | Default working directory for the newly started process. |
path | Complete path to executable that should be executed by the new process. |
commandLineArgs | Optional command line arguments passed to the new process. |
userConfig | Contains information about process configuration. |
◆ Start() [2/2]
void Arp::System::Commons::Runtime::Process::Start |
( |
const String & |
workingDirectory, |
|
|
const String & |
path, |
|
|
const String & |
commandLineArgs = "" |
|
) |
| |
Starts a new separate process.
- Parameters
-
workingDirectory | Default working directory for the newly started process. |
path | Complete path to executable that should be executed by the new process. |
commandLineArgs | Optional command line arguments passed to the new process. |
◆ StartBlocking()
int Arp::System::Commons::Runtime::Process::StartBlocking |
( |
const String & |
workingDirectory, |
|
|
const String & |
path, |
|
|
const String & |
commandLineArgs, |
|
|
int & |
exitStatus |
|
) |
| |
Starts a new separate process. And waits until the child process exits
- Parameters
-
workingDirectory | Default working directory for the newly started process. |
path | Complete path to executable that should be executed by the new process. |
commandLineArgs | Optional command line arguments passed to the new process. |
exitStatus | stores exitStatus of process after call |
- Returns
- 0 on success, -1 on error starting process
◆ StartDaemon()
void Arp::System::Commons::Runtime::Process::StartDaemon |
( |
const String & |
workingDirectory, |
|
|
const String & |
path, |
|
|
const String & |
commandLineArgs = "" |
|
) |
| |
Starts a new separate process as a daemon
- Parameters
-
workingDirectory | Default working directory for the newly started process. |
path | Complete path to executable that should be executed by the new process. |
commandLineArgs | Optional command line arguments passed to the new process. |
Starts the process detached from the current process' session
The documentation for this class was generated from the following files:
- Arp/System/Commons/Runtime/Process.hpp
- Arp/System/Commons/Runtime/Process.cpp