diff options
Diffstat (limited to 'boost/process/detail/posix/io_context_ref.hpp')
-rw-r--r-- | boost/process/detail/posix/io_context_ref.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/boost/process/detail/posix/io_context_ref.hpp b/boost/process/detail/posix/io_context_ref.hpp index 6eefee2247..13afec3afa 100644 --- a/boost/process/detail/posix/io_context_ref.hpp +++ b/boost/process/detail/posix/io_context_ref.hpp @@ -64,7 +64,7 @@ struct async_handler_collector void operator()(T & t) const { handlers.push_back(t.on_exit_handler(exec)); - }; + } }; //Also set's up waiting for the exit, so it can close async stuff. @@ -79,6 +79,7 @@ struct io_context_ref : handler_base_ext template <class Executor> void on_success(Executor& exec) { + ios.notify_fork(boost::asio::io_context::fork_parent); //must be on the heap so I can move it into the lambda. auto asyncs = boost::fusion::filter_if< is_async_handler< @@ -105,6 +106,15 @@ struct io_context_ref : handler_base_ext sigchld_service.async_wait(exec.pid, std::move(wh)); } + template<typename Executor> + void on_setup (Executor &) const {/*ios.notify_fork(boost::asio::io_context::fork_prepare);*/} + + template<typename Executor> + void on_exec_setup (Executor &) const {/*ios.notify_fork(boost::asio::io_context::fork_child);*/} + + template <class Executor> + void on_error(Executor&, const std::error_code &) const {/*ios.notify_fork(boost::asio::io_context::fork_parent);*/} + private: boost::asio::io_context &ios; boost::process::detail::posix::sigchld_service &sigchld_service = boost::asio::use_service<boost::process::detail::posix::sigchld_service>(ios); |