A platform-specific process implementation.
More...
#include <process.hxx>
|
| | ~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 > |
| |
A platform-specific process implementation.
◆ ~PlatformProcess() [1/2]
| pl::PlatformProcess::~PlatformProcess |
( |
| ) |
|
◆ ~PlatformProcess() [2/2]
| pl::PlatformProcess::~PlatformProcess |
( |
| ) |
|
◆ kill() [1/2]
| auto pl::PlatformProcess::kill |
( |
uint32_t const |
exitCode | ) |
-> std::error_code |
Stop the process immediately. See Process::kill().
- Parameters
-
| exitCode | Ignored; 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
-
| exitCode | The 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
-
| executablePath | Fully qualified path of the exectuable to run. |
| arguments | The 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
-
| executablePath | Fully qualified path of the exectuable to run. |
| arguments | The arguments to launch the process with. |
- Returns
- An error code, if any.
◆ terminate() [1/2]
| auto pl::PlatformProcess::terminate |
( |
| ) |
-> std::error_code |
◆ 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:
- /home/runner/work/proc-lib/proc-lib/src/lib/proc-lib/posix/proc-lib/platform/process.hxx
- /home/runner/work/proc-lib/proc-lib/src/lib/proc-lib/win32/proc-lib/platform/process.hxx