#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.
Public Member Functions | |
| ProcessStarter (TaskProcessor &task_processor) | |
| ChildProcess | Exec (const std::string &executable_path, const std::vector< std::string > &args, ExecOptions &&options={}) |
|
explicit |
| task_processor | will be used for executing asynchronous posix_spawn. main-task-processor is OK for this purpose. |
| ChildProcess engine::subprocess::ProcessStarter::Exec | ( | const std::string & | executable_path, |
| const std::vector< std::string > & | args, | ||
| ExecOptions && | options = {} ) |
| 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 |
| std::runtime_error | if use_path is true, executable_path contains / and PATH not in environment variables |