![]() |
Home | Libraries | People | FAQ | More |
boost::process::extend::windows_executor — The windows executor type.
// In header: <boost/process/extend.hpp>
template<typename Char, typename Sequence>
struct windows_executor {
// types
typedef ; // The type of the startup-info, depending on the char-type.
typedef ; // The type of the extended startup-info, depending the char-type; only defined with winapi-version equal or higher than 6.
// public member functions
() ;
(, );
(, );
();
// public data members
seq; // A reference to the actual initializer-sequence.
exe; // A pointer to the name of the executable. It's null by default.
cmd_line; // A pointer to the argument-vector. Must be set by some initializer.
env; // A pointer to the environment variables. It's null by default.
work_dir; // A pointer to the working directory. It's null by default.
proc_attrs; // A pointer to the process-attributes of type SECURITY_ATTRIBUTES. It's null by default.
thread_attrs; // A pointer to the thread-attributes of type SECURITY_ATTRIBUTES. It' null by default.
inherit_handles; // A logical bool value setting whether handles shall be inherited or not.
proc_info; // The element holding the process-information after process creation. The type is PROCESS_INFORMATION
exit_status; // This shared-pointer holds the exit code. It's done this way, so it can be shared between an asio::io_context
and child.
creation_flags; // The creation flags of the process.
startup_info; // This element is an instance or a reference (if startup_info_ex exists) to the startup-info for the process.
startup_info_ex; // This element is the instance of the extended startup-info. It is only available with a winapi-version equal or highter than 6.
};
This type represents the posix executor and can be used for overloading in a custom handler.
![]() |
Note |
---|---|
It is an alias for the implementation on posix, and a forward-declaration on windows. |
As information for extension development, here is the structure of the process launching (in pseudo-code and uml)
on_setup(*error()) { on_error(*error()); child(); } ( child error()) on_error(*error()); on_success(*error()) { on_error(*error()); child(); }
The sequence for windows process creation.
typename Char
The used char-type, either char
or wchar_t
.
typename Sequence
The used initializer-sequence, it is fulfills the boost.fusion sequence concept.
windows_executor
public member functions() ;This function returns a const reference to the error state of the executor.
( ec, msg);
This function can be used to report an error to the executor. This will be handled according to the configuration of the executor, i.e. it might throw an exception.
![]() |
Note |
---|---|
This is the required way to handle errors in initializers. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
( ec, msg);
();This function switches the information, so that the extended structure is used.
![]() |
Note |
---|---|
It's only defined with winapi-version equal or higher than 6. |