[#subprocess-Popen-communicate-00] = xref:subprocess.adoc[subprocess]::xref:subprocess/Popen.adoc[Popen]::communicate :relfileprefix: ../../ :mrdocs: `communicate` overloads == Synopses Declared in `<util/subprocess.h>` Reads the child's output and error until it exits, without sending any input. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<OutBuffer, ErrBuffer> xref:subprocess/Popen/communicate-0a.adoc[communicate](); ---- [.small]#xref:subprocess/Popen/communicate-0a.adoc[_» more..._]# Sends a string to the child, then reads its output and error until it exits. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<OutBuffer, ErrBuffer> xref:subprocess/Popen/communicate-06b.adoc[communicate](std::string const& msg); ---- [.small]#xref:subprocess/Popen/communicate-06b.adoc[_» more..._]# Sends a byte vector to the child, then reads its output and error until it exits. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<OutBuffer, ErrBuffer> xref:subprocess/Popen/communicate-066.adoc[communicate](std::vector<char> const& msg); ---- [.small]#xref:subprocess/Popen/communicate-066.adoc[_» more..._]# Sends raw bytes to the child, then reads its output and error until it exits. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<OutBuffer, ErrBuffer> xref:subprocess/Popen/communicate-01.adoc[communicate]( char const* msg, size_t length); ---- [.small]#xref:subprocess/Popen/communicate-01.adoc[_» more..._]# == Return Value The captured output and error buffers. == Parameters [cols="1,4"] |=== | Name| Description | *msg* | Text to send first. | *length* | Number of bytes to send. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#