12 #include <boost/iostreams/device/file_descriptor.hpp>
23 explicit bind_stdout(
const boost::iostreams::file_descriptor_sink& sink) : sink_(sink)
27 template <
class WindowsExecutor>
31 ::SetHandleInformation(sink_.handle(), HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
32 e.startup_info.hStdOutput = sink_.handle();
33 e.startup_info.dwFlags |= STARTF_USESTDHANDLES;
34 e.inherit_handles =
true;
38 boost::iostreams::file_descriptor_sink sink_;