UNISTDX_IO_TWO_WAY_PIPE
class sys::two_way_pipe

Two-way pipe implemented as two one-way pipes.

  • The pipe is designed for communication between parent and child processes.

Methods
  • swap(two_way_pipe & rhs) -> void

    Swap with rhs.

  • validate() -> void

    Validate files descriptors in the calling process.

  • close_unused() -> void

    Close unused file descriptors in the calling process.

  • close_in_parent() -> void

    Close unused file descriptors in parent process.

  • close_in_child() -> void

    Close unused file descriptors in child process.

  • close() -> void

    Close all pipe file descriptors.

  • open() -> void

    Create two-way pipe by creating two one-way pipes.

  • out() const -> const fildes &

    Get calling process' output file descriptor.

  • out() -> fildes &

    Get calling process' output file descriptor.

  • in() const -> const fildes &

    Get calling process' input file descriptor.

  • in() -> fildes &

    Get calling process' input file descriptor.

  • is_owner() const -> bool

    Returns true, if the calling process created this pipe.

  • child_out() const -> const fildes &

    Child output file descriptor.

  • child_out() -> fildes &

    Child output file descriptor.

  • child_in() const -> const fildes &

    Child input file descriptor.

  • child_in() -> fildes &

    Child input file descriptor.

  • parent_out() const -> const fildes &

    Parent output file descriptor.

  • parent_out() -> fildes &

    Parent output file descriptor.

  • parent_in() const -> const fildes &

    Parent input file descriptor.

  • parent_in() -> fildes &

    Parent input file descriptor.

  • operator=(two_way_pipe && rhs) -> two_way_pipe &

    Move-assignment.

  • operator=(two_way_pipe &) -> two_way_pipe &
  • two_way_pipe(two_way_pipe &&)

    Move-constructor.

  • two_way_pipe(const two_way_pipe &)
  • ~two_way_pipe()
  • two_way_pipe()
Friends
  • operator<<

    Output both pipes.

operator<<(std::ostream & out, const two_way_pipe & rhs) -> std::ostream &

Output both pipes.

swap(two_way_pipe & lhs, two_way_pipe & rhs) -> void

Overload of std::swap for two_way_pipe.