[#subprocess-Popen] = xref:subprocess.adoc[subprocess]::Popen :relfileprefix: ../ :mrdocs: class: 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. == Synopsis Declared in `<util/subprocess.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class Popen; ---- == Description API's provided by the class: Popen({"cmd"}, output{..}, error{..}, ....) Command provided as a sequence. wait() ‐ Wait for the child to exit. retcode() ‐ The return code of the exited child. send(...) ‐ Send input to the input channel of the child. communicate(...) ‐ Get the output/error from the child and close the channels from the parent side. == 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. | xref:subprocess/Popen/send-06.adoc[`send`] | `send` overloads | xref:subprocess/Popen/set_err_buf_cap.adoc[`set_err_buf_cap`] | Sets the capacity of the buffer used to capture the child's error output. | xref:subprocess/Popen/set_out_buf_cap.adoc[`set_out_buf_cap`] | Sets the capacity of the buffer used to capture the child's output. | xref:subprocess/Popen/wait.adoc[`wait`] | Waits for the child process to exit and returns its status. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#