summaryrefslogtreecommitdiff
path: root/boost/process/detail/windows/file_in.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/process/detail/windows/file_in.hpp')
-rw-r--r--boost/process/detail/windows/file_in.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/boost/process/detail/windows/file_in.hpp b/boost/process/detail/windows/file_in.hpp
index c39235fb3d..c56f91ef08 100644
--- a/boost/process/detail/windows/file_in.hpp
+++ b/boost/process/detail/windows/file_in.hpp
@@ -13,16 +13,20 @@
#include <boost/winapi/process.hpp>
#include <boost/winapi/handles.hpp>
#include <boost/process/detail/handler_base.hpp>
+#include <boost/process/detail/used_handles.hpp>
#include <boost/process/detail/windows/file_descriptor.hpp>
#include <io.h>
namespace boost { namespace process { namespace detail { namespace windows {
-struct file_in : public ::boost::process::detail::handler_base
+struct file_in : public ::boost::process::detail::handler_base,
+ ::boost::process::detail::uses_handles
{
file_descriptor file;
::boost::winapi::HANDLE_ handle = file.handle();
+ ::boost::winapi::HANDLE_ get_used_handles() const { return handle; }
+
template<typename T>
file_in(T&& t) : file(std::forward<T>(t), file_descriptor::read) {}
file_in(FILE * f) : handle(reinterpret_cast<::boost::winapi::HANDLE_>(_get_osfhandle(_fileno(f)))) {}