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

class&colon; Popen This is the single most important class in the whole library and glues together all the helper classes to provide a common interface to the client&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Popen;
----

== Description

API&apos;s provided by the class&colon; Popen(&lcub;&quot;cmd&quot;&rcub;, output&lcub;&period;&period;&rcub;, error&lcub;&period;&period;&rcub;, &period;&period;&period;&period;) Command provided as a sequence&period; wait() &hyphen; Wait for the child to exit&period; retcode() &hyphen; The return code of the exited child&period; send(&period;&period;&period;) &hyphen; Send input to the input channel of the child&period; communicate(&period;&period;&period;) &hyphen; Get the output&sol;error from the child and close the channels from the parent side&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:subprocess/Popen/2constructor-07.adoc[`Popen`]         [.small]#[constructor]#
| Constructors
| xref:subprocess/Popen/communicate-00.adoc[`communicate`] 
| `communicate` overloads
| xref:subprocess/Popen/retcode.adoc[`retcode`] 
| Returns the return code of the child process, valid after it has exited&period;
| xref:subprocess/Popen/send-06.adoc[`send`] 
| `send` overloads
| xref:subprocess/Popen/set_err_buf_cap.adoc[`set&lowbar;err&lowbar;buf&lowbar;cap`] 
| Sets the capacity of the buffer used to capture the child&apos;s error output&period;
| xref:subprocess/Popen/set_out_buf_cap.adoc[`set&lowbar;out&lowbar;buf&lowbar;cap`] 
| Sets the capacity of the buffer used to capture the child&apos;s output&period;
| xref:subprocess/Popen/wait.adoc[`wait`] 
| Waits for the child process to exit and returns its status&period;
|===



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