#include <userver/engine/subprocess/process_starter.hpp>
Creates a new OS subprocess and executes a command in it.
Definition at line 48 of file process_starter.hpp.
◆ ProcessStarter()
engine::subprocess::ProcessStarter::ProcessStarter |
( |
TaskProcessor & | task_processor | ) |
|
|
explicit |
- Parameters
-
task_processor | will be used for executing asynchronous fork + exec. main-task-processor is OK for this purpose. |
◆ Exec()
ChildProcess engine::subprocess::ProcessStarter::Exec |
( |
const std::string & | executable_path, |
|
|
const std::vector< std::string > & | args, |
|
|
ExecOptions && | options = {} ) |
- Parameters
-
executable_path | the absolute path or relative path. If use_path is true , and executable_path does not contain / , then it will be searched in the colon-separated list of directory pathnames specified in the PATH environment variable. More details ExecOptions::use_path |
args | exact args passed to the executable |
options | ExecOptions settings |
- Exceptions
-
std::runtime_error | if use_path is true , executable_path contains / and PATH not in environment variables |
The documentation for this class was generated from the following file: