subprocess::Popen::communicate

communicate overloads

Synopses

Declared in <util/subprocess.h>

Reads the child's output and error until it exits, without sending any input.

std::pair<OutBuffer, ErrBuffer>
communicate();
» more...

Sends a string to the child, then reads its output and error until it exits.

std::pair<OutBuffer, ErrBuffer>
communicate(std::string const& msg);
» more...

Sends a byte vector to the child, then reads its output and error until it exits.

std::pair<OutBuffer, ErrBuffer>
communicate(std::vector<char> const& msg);
» more...

Sends raw bytes to the child, then reads its output and error until it exits.

std::pair<OutBuffer, ErrBuffer>
communicate(
    char const* msg,
    size_t length);
» more...

Return Value

The captured output and error buffers.

Parameters

NameDescription
msgText to send first.
lengthNumber of bytes to send.