userver: engine::subprocess::ProcessStarter Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
engine::subprocess::ProcessStarter Class Reference

#include <userver/engine/subprocess/process_starter.hpp>

Detailed Description

Creates a new OS subprocess and executes a command in it.

Definition at line 48 of file process_starter.hpp.

Public Member Functions

ChildProcess Exec (const std::string &executable_path, const std::vector< std::string > &args, ExecOptions &&options={})
 

Member Function Documentation

◆ Exec()

ChildProcess engine::subprocess::ProcessStarter::Exec ( const std::string & executable_path,
const std::vector< std::string > & args,
ExecOptions && options = {} )
Parameters
task_processorwill be used for executing asynchronous fork + exec. `main-task-processor is OK for this purpose. explicit ProcessStarter(TaskProcessor& task_processor);

/

Parameters
executable_paththe 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 /
argsexact args passed to the executable /
optionsExecOptions settings /
Exceptions
std::runtime_errorif use_path is true, executable_path contains / and PATH not in environment variables

The documentation for this class was generated from the following file: