|  | Home | Libraries | People | FAQ | More | 
boost::process::extend::handler
// In header: <boost/process/extend.hpp> struct handler { // public member functions template<typename Executor> void on_setup(Executor &) const; template<typename Executor> void on_error(Executor &, const std::error_code &) const; template<typename Executor> void on_success(Executor &) const; template<typename Executor> void on_fork_error(Executor &, const std::error_code &) const; template<typename Executor> void on_exec_setup(Executor &) const; template<typename Executor> void on_exec_error(Executor &, const std::error_code &) const; };
This class is the base for every initializer, to be used for extensions.
The usage is done through compile-time polymorphism, so that the required functions can be overloaded.
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| None of the function need to be  | 
handler public member functionstemplate<typename Executor> void on_setup(Executor &) const;This function is invoked before the process launch.
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| It is not required to be const. | 
template<typename Executor> void on_error(Executor &, const std::error_code &) const;
This function is invoked if an error occured while trying to launch the process.
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| It is not required to be const. | 
template<typename Executor> void on_success(Executor &) const;
This function is invoked if the process was successfully launched.
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| It is not required to be const. | 
template<typename Executor> void on_fork_error(Executor &, const std::error_code &) const;
This function is invoked if an error occured during the call of fork. 
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| This function will only be called on posix. | 
template<typename Executor> void on_exec_setup(Executor &) const;
This function is invoked if the call of fork was successful, before calling execve. 
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| This function will only be called on posix. | 
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| It will be invoked from the new process. | 
template<typename Executor> void on_exec_error(Executor &, const std::error_code &) const;
This function is invoked if the call of execve failed. 
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| This function will only be called on posix. | 
| ![[Note]](../../../../../doc/src/images/note.png) | Note | 
|---|---|
| It will be invoked from the new process. |