diff --git a/include/boost/process/async.hpp b/include/boost/process/async.hpp index 378d528e..7fe46b54 100644 --- a/include/boost/process/async.hpp +++ b/include/boost/process/async.hpp @@ -87,30 +87,6 @@ struct initializer_builder using ::boost::asio::buffer; - -/** When an io_service is passed, the on_exit property can be used, to be notified - when the child process exits. - - -The following syntax is valid - -\code{.cpp} -on_exit=function; -on_exit(function); -\endcode - -with `function` being callable with `(int, const std::error_code&)`. - -\par Example - -\code{.cpp} -io_service ios; -spawn("ls", on_exit=[](int exit, const std::error_code& ec_in){}); -\endcode - - */ -constexpr static ::boost::process::detail::on_exit_ on_exit{}; - }} diff --git a/include/boost/process/detail/on_exit.hpp b/include/boost/process/detail/on_exit.hpp index 00d1fc37..6e15db03 100644 --- a/include/boost/process/detail/on_exit.hpp +++ b/include/boost/process/detail/on_exit.hpp @@ -23,12 +23,31 @@ struct on_exit_ api::on_exit_ operator()(const std::function & f) const {return f;} }; - -constexpr static on_exit_ on_exit; - } -using ::boost::process::detail::on_exit; +/** When an io_service is passed, the on_exit property can be used, to be notified + when the child process exits. + + +The following syntax is valid + +\code{.cpp} +on_exit=function; +on_exit(function); +\endcode + +with `function` being callable with `(int, const std::error_code&)`. + +\par Example + +\code{.cpp} +io_service ios; +spawn("ls", on_exit=[](int exit, const std::error_code& ec_in){}); +\endcode + + */ +constexpr static ::boost::process::detail::on_exit_ on_exit{}; + }} #endif /* INCLUDE_BOOST_PROCESS_WINDOWS_ON_EXIT_HPP_ */