process-cpp 3.0.0
A simple convenience library for handling processes in C++11.
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 class  Status {
  undefined ,
  no_state_change ,
  exited ,
  signaled ,
  stopped ,
  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.
 

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

The status of the process/wait operation.

Enumerator
undefined 

Marks an undefined state.

no_state_change 

No state change occurred.

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.

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

◆ [union]

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

Union of result-specific details.

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

◆ [struct]

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().

◆ [struct]

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().

◆ [struct]

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.

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

◆ status [1/2]

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

◆ 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: