boost::process::executor
// In header: <boost/process/executor.hpp> struct executor { // construct/copy/destruct executor(); // public member functions template<typename Initializer, class... Initializers> child operator()(const Initializer &, const Initializers...&); // public data members LPCTSTR exe; LPTSTR cmd_line; LPSECURITY_ATTRIBUTES proc_attrs; LPSECURITY_ATTRIBUTES thread_attrs; BOOL inherit_handles; DWORD creation_flags; LPVOID env; LPCTSTR work_dir; STARTUPINFO startup_info; STARTUPINFOEX startup_info_ex; PROCESS_INFORMATION proc_info; const char * exe; char ** cmd_line; char ** env; };
Starts a program.
boost::process::executor is a functor which calls the system functions to start a program. Before system functions are called it iterates over initializers and calls a member function passing a reference to itself as a parameter. Initializers get then a chance to setup the executor. If system functions fail boost::process::executor again iterates over initializers and calls another member function passing a reference to itself as a parameter. This gives initializers a chance to handle the error.
Note | |
---|---|
Library users shouldn't need to use boost::process::executor. It is recommended to call boost::process::execute which uses boost::pocess::executor internally. |
executor
public member functionstemplate<typename Initializer, class... Initializers> child operator()(const Initializer & initializer, const Initializers...& initializers);
Starts a program.
executor
public
public data membersLPCTSTR exe;
Program name.
Windows only.
LPTSTR cmd_line;
Command line.
Windows only.
LPSECURITY_ATTRIBUTES proc_attrs;
Process attributes.
Windows only.
LPSECURITY_ATTRIBUTES thread_attrs;
Thread attributes.
Windows only.
BOOL inherit_handles;
Flag to inherit handles.
Windows only.
DWORD creation_flags;
Creation flags.
Windows only.
LPVOID env;
Environment variables.
Windows only.
LPCTSTR work_dir;
Work directory.
Windows only.
STARTUPINFO startup_info;
Startupinfo structure.
Windows only.
STARTUPINFOEX startup_info_ex;
Startupinfoex structure.
If this member variable is available, startup_info
is a reference to StartupInfo
in STARTUPINFOEX.
Windows Vista, Windows Server 2008 or better.
PROCESS_INFORMATION proc_info;
Process information.
proc_info
contains the result after a child process could be started successfully.
Windows only.
const char * exe;
Program name.
POSIX only.
char ** cmd_line;
Command line arguments.
POSIX only.
char ** env;
Environment variables.
POSIX only.