13 #include <boost/iostreams/device/file_descriptor.hpp>
22 explicit bind_stdout(
const boost::iostreams::file_descriptor_sink& sink) : sink_(sink) {}
24 template <
class WindowsExecutor>
27 ::SetHandleInformation(sink_.handle(), HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
28 e.startup_info.hStdOutput = sink_.handle();
29 e.startup_info.dwFlags |= STARTF_USESTDHANDLES;
30 e.inherit_handles =
true;
34 boost::iostreams::file_descriptor_sink sink_;