dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx::Subprocess::Process::ExitStatus Struct Reference

Variant describing the last known termination state. More...

#include <dfx-subprocess/Process.hpp>

Inheritance diagram for dfx::Subprocess::Process::ExitStatus:
[legend]
Collaboration diagram for dfx::Subprocess::Process::ExitStatus:
[legend]

Public Member Functions

bool isSet () const noexcept
 True if a non-empty status is available.
bool isSpawnError () const noexcept
 True if the child failed during spawn/exec.
bool isExited () const noexcept
 True if the process exited normally.
bool isSignaled () const noexcept
 True if the process was terminated by a signal.
SpawnError const & toSpawnError () const
 Access the SpawnError variant. Throws std::bad_variant_access if not that alternative.
Exited const & toExited () const
 Access the Exited variant. Throws std::bad_variant_access if not that alternative.
Signaled const & toSignaled () const
 Access the Signaled variant. Throws std::bad_variant_access if not that alternative.

Detailed Description

Variant describing the last known termination state.

  • std::monostate means no status is available yet.
  • SpawnError indicates the child failed before/at exec.
  • Exited indicates a normal exit with an exit code.
  • Signaled indicates termination by signal.

Member Function Documentation

◆ isExited()

bool dfx::Subprocess::Process::ExitStatus::isExited ( ) const
inlinenoexcept

True if the process exited normally.

◆ isSet()

bool dfx::Subprocess::Process::ExitStatus::isSet ( ) const
inlinenoexcept

True if a non-empty status is available.

◆ isSignaled()

bool dfx::Subprocess::Process::ExitStatus::isSignaled ( ) const
inlinenoexcept

True if the process was terminated by a signal.

◆ isSpawnError()

bool dfx::Subprocess::Process::ExitStatus::isSpawnError ( ) const
inlinenoexcept

True if the child failed during spawn/exec.

◆ toExited()

Exited const & dfx::Subprocess::Process::ExitStatus::toExited ( ) const
inline

Access the Exited variant. Throws std::bad_variant_access if not that alternative.

◆ toSignaled()

Signaled const & dfx::Subprocess::Process::ExitStatus::toSignaled ( ) const
inline

Access the Signaled variant. Throws std::bad_variant_access if not that alternative.

◆ toSpawnError()

SpawnError const & dfx::Subprocess::Process::ExitStatus::toSpawnError ( ) const
inline

Access the SpawnError variant. Throws std::bad_variant_access if not that alternative.


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