Bitcoin Core 28.99.0
P2P Digital Currency
|
#include <subprocess.h>
Public Member Functions | |
template<typename... Args> | |
Popen (const std::string &cmd_args, Args &&...args) | |
template<typename... Args> | |
Popen (std::initializer_list< const char * > cmd_args, Args &&...args) | |
template<typename... Args> | |
Popen (std::vector< std::string > vargs_, Args &&... args) | |
int | retcode () const noexcept |
int | wait () noexcept(false) |
void | set_out_buf_cap (size_t cap) |
void | set_err_buf_cap (size_t cap) |
int | send (const char *msg, size_t length) |
int | send (const std::string &msg) |
int | send (const std::vector< char > &msg) |
std::pair< OutBuffer, ErrBuffer > | communicate (const char *msg, size_t length) |
std::pair< OutBuffer, ErrBuffer > | communicate (const std::string &msg) |
std::pair< OutBuffer, ErrBuffer > | communicate (const std::vector< char > &msg) |
std::pair< OutBuffer, ErrBuffer > | communicate () |
Private Member Functions | |
template<typename F , typename... Args> | |
void | init_args (F &&farg, Args &&... args) |
void | init_args () |
void | populate_c_argv () |
void | execute_process () noexcept(false) |
Private Attributes | |
detail::Streams | stream_ |
std::string | exe_name_ |
std::string | args_ |
std::vector< std::string > | vargs_ |
std::vector< char * > | cargv_ |
int | child_pid_ = -1 |
int | retcode_ = -1 |
Friends | |
struct | detail::ArgumentDeducer |
class | detail::Child |
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.
API's provided by the class: Popen({"cmd"}, output{..}, error{..}, ....) Command provided as a sequence. Popen("cmd arg1", output{..}, error{..}, ....) Command provided in a single string. 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.
Definition at line 909 of file subprocess.h.
|
inline |
|
inline |
|
inline |
Definition at line 987 of file subprocess.h.
|
inlineprivatenoexcept |
Definition at line 1062 of file subprocess.h.
|
inlineprivate |
Definition at line 1021 of file subprocess.h.
|
inlineprivate |
|
inlineprivate |
|
inlinenoexcept |
|
inline |
Definition at line 959 of file subprocess.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
Definition at line 1041 of file subprocess.h.
|
friend |
Definition at line 912 of file subprocess.h.
|
friend |
Definition at line 913 of file subprocess.h.
|
private |
Definition at line 1010 of file subprocess.h.
|
private |
Definition at line 1013 of file subprocess.h.
|
private |
Definition at line 1016 of file subprocess.h.
|
private |
Definition at line 1007 of file subprocess.h.
|
private |
Definition at line 1018 of file subprocess.h.
|
private |
Definition at line 1000 of file subprocess.h.
|
private |
Definition at line 1012 of file subprocess.h.