hmbdc
simplify-high-performance-messaging-programming
|
execute a program as a child and capture its stdin stdout and/or stderr More...
#include <ExecutionIo.hpp>
Public Member Functions | |
ExecutionIo (const char *const argv[], bool captureStderr=false) | |
execute a program as a child and capture its stdin stdout and/or stderr More... | |
ExecutionIo & | operator<< (char const *input) |
ExecutionIo & | operator<< (std::string const &input) |
ExecutionIo & | operator>> (std::string &output) |
ExecutionIo & | readErr (std::string &output) |
Public Attributes | |
int | exeStdinFd |
child stdin fd, use write on it - not read More... | |
int | exeStdoutFd |
child stdout fd, use read on it - not write More... | |
int | exeStderrFd |
if captured, child stderr fd, use read on it - not write More... | |
pid_t | exePid |
process id of the started child process | |
execute a program as a child and capture its stdin stdout and/or stderr
IO are exposed in the fd form
hmbdc::os::ExecutionIo::ExecutionIo | ( | const char *const | argv[], |
bool | captureStderr = false |
||
) |
execute a program as a child and capture its stdin stdout and/or stderr
argv | ullptr terminated command line args array, for example, {"/usr/bin/bc", "-q", nullptr} |
captureStderr | optionally capture |
int hmbdc::os::ExecutionIo::exeStderrFd |
if captured, child stderr fd, use read on it - not write
blocking by default
int hmbdc::os::ExecutionIo::exeStdinFd |
child stdin fd, use write on it - not read
blocking by default
int hmbdc::os::ExecutionIo::exeStdoutFd |
child stdout fd, use read on it - not write
blocking by default