CppUtils::System::ProcessStatus
CLASSEncapsulates the execution status of a child process.
Description
Section intitulée « Description »Wraps the POSIX wait status integer and provides friendly inspection methods for exit codes, abnormal termination signals, and detailed diagnostic causes.
Méthodes publiques
Section intitulée « Méthodes publiques »Constructs a ProcessStatus from a raw POSIX wait status integer.
| Paramètre | Description |
|---|---|
rawStatus | Integer returned by waitpid / wait. |
Returns the raw POSIX status code.
Retourne : Raw status integer.
Checks if the process terminated normally via exit() or returning from main().
Retourne : True if the process exited normally.
Returns the exit code of the process if it terminated normally.
Retourne : Exit status integer (0-255).
Checks if the process was terminated by an unhandled signal.
Retourne : True if the process was terminated by a signal.
[[nodiscard]] constexpr auto ProcessStatus::getTerminalSignal() const noexcept -> std::optional<Signal>;Returns the signal that caused the process to terminate.
Retourne : Strongly-typed Signal enumerator.
Checks if the process generated a core dump upon abnormal termination.
Retourne : True if a core dump was produced.
[[nodiscard]] constexpr auto ProcessStatus::getTerminalSignalName() const noexcept -> std::string_view;Returns the symbolic name of the termination signal if signaled.
Retourne : Signal name (e.g. “SIGSEGV”), or empty string view if not signaled.