subprocess::Popen

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>

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

NameDescription
Popen [constructor]Constructors
communicate communicate overloads
retcode Returns the return code of the child process, valid after it has exited.
send send overloads
set_err_buf_cap Sets the capacity of the buffer used to capture the child's error output.
set_out_buf_cap Sets the capacity of the buffer used to capture the child's output.
wait Waits for the child process to exit and returns its status.