![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Manages a subprocess launched by galaxy. More...
#include <Subprocess.hpp>
Public Member Functions | |
Subprocess () noexcept | |
Constructor. | |
Subprocess (std::string_view process, std::span< std::string > args={}) | |
Create constructor. | |
~Subprocess () noexcept | |
Destructor. | |
void | create (std::string_view process, std::span< std::string > args={}) |
Launch a subprocess. | |
int | join () noexcept |
Wait for a process to finish execution. | |
void | terminate () noexcept |
Terminate process, killing if alive. | |
void | destroy () noexcept |
Destroy process, preserving if alive. | |
bool | alive () noexcept |
Check if subprocess is still alive and executing. | |
Private Attributes | |
subprocess | m_process |
Process information and handles. | |
Manages a subprocess launched by galaxy.
Definition at line 29 of file Subprocess.hpp.
|
noexcept |
Constructor.
Definition at line 16 of file Subprocess.cpp.
galaxy::platform::Subprocess::Subprocess | ( | std::string_view | process, |
std::span< std::string > | args = {} ) |
Create constructor.
process | Subprocess to launch. Can include a path. |
args | Command-line args to set for process. Optional. |
Definition at line 21 of file Subprocess.cpp.
|
noexcept |
Destructor.
Calls terminate().
Definition at line 27 of file Subprocess.cpp.
void galaxy::platform::Subprocess::create | ( | std::string_view | process, |
std::span< std::string > | args = {} ) |
Launch a subprocess.
process | Subprocess to launch. Can include a path. |
args | Command-line args to set for process. Optional. |
Definition at line 32 of file Subprocess.cpp.
|
noexcept |
Wait for a process to finish execution.
Definition at line 52 of file Subprocess.cpp.
|
noexcept |
Terminate process, killing if alive.
Definition at line 68 of file Subprocess.cpp.
|
noexcept |
Destroy process, preserving if alive.
Definition at line 79 of file Subprocess.cpp.
|
nodiscardnoexcept |
Check if subprocess is still alive and executing.
Definition at line 90 of file Subprocess.cpp.
|
private |
Process information and handles.
Definition at line 90 of file Subprocess.hpp.