process
A small C++ library to spawn processes on POSIX systems and communicate with them via streams.
Build
Use Bazel to build this library.
To build and run tests, use the following command:
bazel test '//...'
Example
auto cmd = process::command("sh").arg("-c").arg("echo Hello World!");
auto h = proc.run();
auto line = std::string{};
std::getline(h.stdout(), line); // => line = "Hello World!"
auto rc = h.join(); // => rc = 0, exit code
For more examples see command_test.cpp.