#include <algorithm>
#include <iostream>
#include <string>
int main(int argc, char** argv)
{
if (argc > 1)
{
std::string message = "test message";
std::cout << "Executing child process..." << std::endl;
int result = child.
Wait();
std::cout << "Executed child process! Result = " << result << std::endl;
std::cout << "stdout: " << out << std::endl;
std::cout << "stderr: " << err << std::endl;
return 0;
}
std::string line;
if (getline(std::cin, line))
{
std::cout << line << std::endl;
std::reverse(line.begin(), line.end());
std::cerr << line << std::endl;
}
return 123;
}
static std::string EndLine()
Get text end line separator.
size_t Write(const void *buffer, size_t size) override
Write a byte buffer into the pipe.
std::string ReadAllText()
Read all text.
static Process Execute(const std::string &command, const std::vector< std::string > *arguments=nullptr, const std::map< std::string, std::string > *envars=nullptr, const std::string *directory=nullptr, Pipe *input=nullptr, Pipe *output=nullptr, Pipe *error=nullptr)
Execute a new process.
int Wait()
Wait the process to exit.
Environment management definition.