ProcLib 0.0.1.0
A cross-platform process runner.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
pl::PlatformProcess Class Reference

A platform-specific process implementation. More...

#include <process.hxx>

Public Member Functions

 ~PlatformProcess ()
 Destructor.
 
auto start (std::filesystem::path const &executablePath, std::vector< std::string > const &arguments) -> std::error_code
 
auto terminate () -> std::error_code
 
auto kill (uint32_t const exitCode) -> std::error_code
 
auto wait () -> std::expected< PlatformExitStatus, std::error_code >
 
 ~PlatformProcess ()
 Destructor.
 
auto start (std::filesystem::path const &executablePath, std::vector< std::string > const &arguments) -> std::error_code
 
auto terminate () -> std::error_code
 
auto kill (uint32_t const exitCode) -> std::error_code
 
auto wait () -> std::expected< PlatformExitStatus, std::error_code >
 

Detailed Description

A platform-specific process implementation.

Constructor & Destructor Documentation

◆ ~PlatformProcess() [1/2]

pl::PlatformProcess::~PlatformProcess ( )

Destructor.

◆ ~PlatformProcess() [2/2]

pl::PlatformProcess::~PlatformProcess ( )

Destructor.

Member Function Documentation

◆ kill() [1/2]

auto pl::PlatformProcess::kill ( uint32_t const  exitCode) -> std::error_code

Stop the process immediately. See Process::kill().

Parameters
exitCodeIgnored; POSIX signals carry no exit code.
Returns
An error code, if any.

◆ kill() [2/2]

auto pl::PlatformProcess::kill ( uint32_t const  exitCode) -> std::error_code

Stop the process immediately. See Process::kill().

Parameters
exitCodeThe exit code to report for the process.
Returns
An error code, if any.

◆ start() [1/2]

auto pl::PlatformProcess::start ( std::filesystem::path const &  executablePath,
std::vector< std::string > const &  arguments 
) -> std::error_code

Start the process.

Parameters
executablePathFully qualified path of the exectuable to run.
argumentsThe arguments to launch the process with.
Returns
An error code, if any.

◆ start() [2/2]

auto pl::PlatformProcess::start ( std::filesystem::path const &  executablePath,
std::vector< std::string > const &  arguments 
) -> std::error_code

Start the process.

Parameters
executablePathFully qualified path of the exectuable to run.
argumentsThe arguments to launch the process with.
Returns
An error code, if any.

◆ terminate() [1/2]

auto pl::PlatformProcess::terminate ( ) -> std::error_code

Ask the process to stop gracefully. See Process::terminate().

Returns
An error code, if any.

◆ terminate() [2/2]

auto pl::PlatformProcess::terminate ( ) -> std::error_code

Ask the process to stop gracefully. Windows has no general-purpose graceful-stop primitive for arbitrary processes, so this behaves the same as kill().

Returns
An error code, if any.

◆ wait() [1/2]

auto pl::PlatformProcess::wait ( ) -> std::expected< PlatformExitStatus, std::error_code >

Wait for the process to complete.

Returns
The raw OS-reported exit status, or an error code.

◆ wait() [2/2]

auto pl::PlatformProcess::wait ( ) -> std::expected< PlatformExitStatus, std::error_code >

Wait for the process to complete.

Returns
The raw OS-reported exit status, or an error code.

The documentation for this class was generated from the following files: