1 // Copyright (c) 2016 Klemens D. Morgenstern
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_PROCESS_DETAIL_POSIX_HANDLER_HPP_
7 #define BOOST_PROCESS_DETAIL_POSIX_HANDLER_HPP_
9 #include <boost/process/detail/handler_base.hpp>
11 namespace boost { namespace process { namespace detail { namespace posix {
13 //does not extend anything.
14 struct handler_base_ext : handler_base
16 template<typename Executor>
17 void on_fork_error (Executor &, const std::error_code&) const {}
19 template<typename Executor>
20 void on_exec_setup (Executor &) const {}
22 template<typename Executor>
23 void on_exec_error (Executor &, const std::error_code&) const {}
27 template <class Handler>
28 struct on_fork_error_ : handler_base_ext
30 explicit on_fork_error_(Handler handler) : handler_(handler) {}
32 template <class Executor>
33 void on_fork_error(Executor &e, const std::error_code &ec) const
42 template <class Handler>
43 struct on_exec_setup_ : handler_base_ext
45 explicit on_exec_setup_(Handler handler) : handler_(handler) {}
47 template <class Executor>
48 void on_exec_setup(Executor &e) const
56 template <class Handler>
57 struct on_exec_error_ : handler_base_ext
59 explicit on_exec_error_(Handler handler) : handler_(handler) {}
61 template <class Executor>
62 void on_exec_error(Executor &e, const std::error_code &ec) const
74 #endif /* BOOST_PROCESS_DETAIL_POSIX_HANDLER_HPP_ */