File indexing completed on 2025-01-18 09:50:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_PROCESS_WINDOWS_INITIALIZERS_CLOSE_OUT_HPP
0011 #define BOOST_PROCESS_WINDOWS_INITIALIZERS_CLOSE_OUT_HPP
0012
0013 #include <boost/winapi/process.hpp>
0014 #include <boost/winapi/handles.hpp>
0015 #include <boost/process/detail/handler_base.hpp>
0016
0017 namespace boost { namespace process { namespace detail { namespace windows {
0018
0019 template<int p1, int p2>
0020 struct close_out : public ::boost::process::detail::handler_base
0021 {
0022 template <class WindowsExecutor>
0023 inline void on_setup(WindowsExecutor &e) const;
0024 };
0025
0026 template<>
0027 template<typename WindowsExecutor>
0028 void close_out<1,-1>::on_setup(WindowsExecutor &e) const
0029 {
0030 e.startup_info.hStdOutput = ::boost::winapi::INVALID_HANDLE_VALUE_;
0031 e.startup_info.dwFlags |= ::boost::winapi::STARTF_USESTDHANDLES_;
0032 }
0033
0034 template<>
0035 template<typename WindowsExecutor>
0036 void close_out<2,-1>::on_setup(WindowsExecutor &e) const
0037 {
0038 e.startup_info.hStdError = ::boost::winapi::INVALID_HANDLE_VALUE_;
0039 e.startup_info.dwFlags |= ::boost::winapi::STARTF_USESTDHANDLES_;
0040 }
0041
0042 template<>
0043 template<typename WindowsExecutor>
0044 void close_out<1,2>::on_setup(WindowsExecutor &e) const
0045 {
0046 e.startup_info.hStdOutput = ::boost::winapi::INVALID_HANDLE_VALUE_;
0047 e.startup_info.hStdError = ::boost::winapi::INVALID_HANDLE_VALUE_;
0048 e.startup_info.dwFlags |= ::boost::winapi::STARTF_USESTDHANDLES_;
0049 }
0050
0051 }}}}
0052
0053 #endif