File indexing completed on 2025-01-18 09:50:06
0001
0002
0003
0004
0005
0006 #ifndef BOOST_PROCESS_DETAIL_POSIX_HANDLER_HPP_
0007 #define BOOST_PROCESS_DETAIL_POSIX_HANDLER_HPP_
0008
0009 #include <boost/process/detail/handler_base.hpp>
0010
0011 namespace boost { namespace process { namespace detail { namespace posix {
0012
0013
0014 struct handler_base_ext : handler_base
0015 {
0016 template<typename Executor>
0017 void on_fork_error (Executor &, const std::error_code&) const {}
0018
0019 template<typename Executor>
0020 void on_exec_setup (Executor &) const {}
0021
0022 template<typename Executor>
0023 void on_exec_error (Executor &, const std::error_code&) const {}
0024 };
0025
0026
0027 template <class Handler>
0028 struct on_fork_error_ : handler_base_ext
0029 {
0030 explicit on_fork_error_(Handler handler) : handler_(handler) {}
0031
0032 template <class Executor>
0033 void on_fork_error(Executor &e, const std::error_code &ec) const
0034 {
0035 handler_(e, ec);
0036 }
0037 private:
0038 Handler handler_;
0039 };
0040
0041
0042 template <class Handler>
0043 struct on_exec_setup_ : handler_base_ext
0044 {
0045 explicit on_exec_setup_(Handler handler) : handler_(handler) {}
0046
0047 template <class Executor>
0048 void on_exec_setup(Executor &e) const
0049 {
0050 handler_(e);
0051 }
0052 private:
0053 Handler handler_;
0054 };
0055
0056 template <class Handler>
0057 struct on_exec_error_ : handler_base_ext
0058 {
0059 explicit on_exec_error_(Handler handler) : handler_(handler) {}
0060
0061 template <class Executor>
0062 void on_exec_error(Executor &e, const std::error_code &ec) const
0063 {
0064 handler_(e, ec);
0065 }
0066 private:
0067 Handler handler_;
0068 };
0069
0070 }}}}
0071
0072
0073
0074 #endif