#include <ProcessBuilder.hpp>
Helper class to construct RunOptions with minimal typing.
◆ RunBuilder() [1/3]
subprocess::RunBuilder::RunBuilder |
( |
| ) |
|
|
inline |
◆ RunBuilder() [2/3]
Constructs builder with cmd as command to run
◆ RunBuilder() [3/3]
subprocess::RunBuilder::RunBuilder |
( |
std::initializer_list< std::string > |
command | ) |
|
|
inline |
Constructs builder with command to run
◆ cerr()
Sets the cerr option. Could be a PipeOption, output handle
◆ check()
RunBuilder& subprocess::RunBuilder::check |
( |
bool |
ch | ) |
|
|
inline |
Only for run(), throws exception if command returns non-zero exit code
◆ cin()
Set the cin option. Could be PipeOption, input handle, std::string with data to pass.
◆ cout()
Sets the cout option. Could be a PipeOption, output handle
◆ cwd()
RunBuilder& subprocess::RunBuilder::cwd |
( |
std::string |
cwd | ) |
|
|
inline |
Sets the current working directory to use for subprocess
◆ env()
Sets the environment to use. Default is current environment if unset
◆ new_process_group()
RunBuilder& subprocess::RunBuilder::new_process_group |
( |
bool |
new_group | ) |
|
|
inline |
Set to true to run as new process group. On windows the new process has CTRL+C handler disabled so CTRL+C or sending SIGINT won't kill the process. If you want to send CTRL+C you will need to make a new exe that's sole purpose is enabling CTRL+C handling and launching new process and giving process id back to parent process for use.
◆ operator RunOptions()
subprocess::RunBuilder::operator RunOptions |
( |
| ) |
const |
|
inline |
◆ popen()
Popen subprocess::RunBuilder::popen |
( |
| ) |
|
|
inline |
Creates a Popen object running the process asynchronously
- Returns
- Popen object with current configuration.
◆ run()
◆ timeout()
RunBuilder& subprocess::RunBuilder::timeout |
( |
double |
timeout | ) |
|
|
inline |
Timeout to use for run() invocation only.
◆ command
◆ options
The documentation for this struct was generated from the following file: