process-cpp: core::posix::wait::Result Struct Reference

process-cpp 3.0.0 A simple convenience library for handling processes in C++11.

Public Types | Public Attributes | List of all members
core::posix::wait::Result Struct Reference

The Result struct encapsulates the result of waiting for a process state change. More...

`#include <wait.h>`

Collaboration diagram for core::posix::wait::Result:

## Public Types
enum | Status { Status::undefined, Status::no_state_change, Status::exited, Status::signaled, Status::stopped, Status::continued }
| The status of the process/wait operation. More...

## Public Attributes
enum core::posix::wait::Result::Status | status = Status::undefined
union {
struct {
exit::Status status
| Exit status of the process. More...
} if_exited
struct {
Signal signal
| Signal that caused the process to terminate. More...
bool core_dumped
| true if the process termination resulted in a core dump. More...
} if_signaled
struct {
Signal signal
| Signal that caused the process to terminate. More...
} if_stopped
} | detail
| Union of result-specific details. More...

## Detailed Description

The Result struct encapsulates the result of waiting for a process state change.

Definition at line 54 of file wait.h.

## Member Enumeration Documentation

## ◆ Status

enum core::posix::wait::Result::Status
| strong

The status of the process/wait operation.

Enumerator
undefined | Marks an undefined state.
no_state_change | No state change occured.
exited | The process exited normally.
signaled | The process was signalled and terminated.
stopped | The process was signalled and stopped.
continued | The process resumed operation.

Definition at line 59 of file wait.h.

## Member Data Documentation

## ◆ core_dumped

bool core::posix::wait::Result::core_dumped

true if the process termination resulted in a core dump.

Definition at line 88 of file wait.h.

## ◆ detail

union { ... } core::posix::wait::Result::detail

Union of result-specific details.

Referenced by core::posix::ChildProcess::wait_for().

## ◆ if_exited

struct { ... } core::posix::wait::Result::if_exited

Contains the exit status of the process if status == Status::exited.

Referenced by core::posix::ChildProcess::wait_for().

## ◆ if_signaled

struct { ... } core::posix::wait::Result::if_signaled

Contains the signal that caused the process to terminate if status == Status::signaled.

Referenced by core::posix::ChildProcess::wait_for().

## ◆ if_stopped

struct { ... } core::posix::wait::Result::if_stopped

Contains the signal that caused the process to terminate if status == Status::stopped.

Referenced by core::posix::ChildProcess::wait_for().

## ◆ signal

Signal core::posix::wait::Result::signal

Signal that caused the process to terminate.

Definition at line 87 of file wait.h.

## ◆ status [1/2]

enum core::posix::wait::Result::Status core::posix::wait::Result::status = Status::undefined

Referenced by core::posix::ChildProcess::wait_for().

## ◆ status [2/2]

exit::Status core::posix::wait::Result::status

Exit status of the process.

Definition at line 79 of file wait.h.

The documentation for this struct was generated from the following file:

- /build/process-cpp/src/process-cpp-3.0.1/include/core/posix/wait.h