kiron1 / process

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About


Languages

Language:C++ 92.2%Language:Starlark 7.8%