[#subprocess-Popen-send-06]
= xref:subprocess.adoc[subprocess]::xref:subprocess/Popen.adoc[Popen]::send
:relfileprefix: ../../
:mrdocs:

`send` overloads

== Synopses

Declared in `&lt;util&sol;subprocess&period;h&gt;`

Sends the contents of a string to the child&apos;s input channel&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:subprocess/Popen/send-0b.adoc[send](std::string const& msg);
----

[.small]#xref:subprocess/Popen/send-0b.adoc[_» more&period;&period;&period;_]#

Sends the contents of a byte vector to the child&apos;s input channel&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:subprocess/Popen/send-03.adoc[send](std::vector&lt;char&gt; const& msg);
----

[.small]#xref:subprocess/Popen/send-03.adoc[_» more&period;&period;&period;_]#

Sends raw bytes to the child&apos;s input channel&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:subprocess/Popen/send-0a.adoc[send](
    char const* msg,
    size&lowbar;t length);
----

[.small]#xref:subprocess/Popen/send-0a.adoc[_» more&period;&period;&period;_]#

== Return Value

Number of bytes written, or &hyphen;1 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *msg*
| Text to send&period;
| *length*
| Number of bytes to send&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
