PLCnext API Documentation 23.3.0.32
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | List of all members
Arp::System::Commons::Runtime::Process Class Reference

High level API to create and manage a processes. More...

#include <Process.hpp>

Public Member Functions

 Process (void)
 Constructs an Process instance.
 
 Process (const Process &arg)=default
 Copy contructor.
 
Processoperator= (const Process &arg)=default
 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...
 
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)
 Checks if the process has terminated. More...
 

Static Public Member Functions

static void SetupCurrentProcess (int core=-1)
 
Parameters
coreThe core to bind the current process to, -1 means not set.

 
static const String GetCurrentFileName (void)
 Returns the full qualified filename of the executable of the current process. More...
 

Detailed Description

High level API to create and manage a processes.

Member Function Documentation

◆ GetCurrentFileName()

static const 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.

◆ HasExited()

bool Arp::System::Commons::Runtime::Process::HasExited ( void  )

Checks if the process has terminated.

Returns
True if process is not running any more, otherwise false is returned.

◆ Start()

void Arp::System::Commons::Runtime::Process::Start ( const String workingDirectory,
const String path,
const String commandLineArgs = "" 
)

Starts a new separate process.

Parameters
workingDirectoryDefault working directory for the newly started process.
pathComplete path to executable that should be executed by the new process.
commandLineArgsOptional 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
workingDirectoryDefault working directory for the newly started process.
pathComplete path to executable that should be executed by the new process.
commandLineArgsOptional command line arguments passed to the new process.
exitStatusstores 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
workingDirectoryDefault working directory for the newly started process.
pathComplete path to executable that should be executed by the new process.
commandLineArgsOptional 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 file: