/usr/include/boost/process/detail/windows
NameSizeModeActions
asio_fwd.hpp13540644editdlrm
async_handler.hpp11950644editdlrm
async_in.hpp35570644editdlrm
async_out.hpp60790644editdlrm
async_pipe.hpp176110644editdlrm
basic_cmd.hpp50720644editdlrm
basic_pipe.hpp84510644editdlrm
child_handle.hpp31850644editdlrm
close_in.hpp10400644editdlrm
close_out.hpp17430644editdlrm
cmd.hpp9930644editdlrm
compare_handles.hpp14880644editdlrm
environment.hpp109760644editdlrm
env_init.hpp16150644editdlrm
executor.hpp80450644editdlrm
file_descriptor.hpp37470644editdlrm
file_in.hpp17350644editdlrm
file_out.hpp26910644editdlrm
group_handle.hpp65270644editdlrm
group_ref.hpp15720644editdlrm
handler.hpp5660644editdlrm
handles.hpp57460644editdlrm
handle_workaround.hpp89240644editdlrm
io_context_ref.hpp50430644editdlrm
is_running.hpp14110644editdlrm
job_workaround.hpp97210644editdlrm
locale.hpp31540644editdlrm
null_in.hpp15590644editdlrm
null_out.hpp25760644editdlrm
on_exit.hpp12020644editdlrm
pipe_in.hpp25710644editdlrm
pipe_out.hpp35350644editdlrm
search_path.hpp28080644editdlrm
shell_path.hpp15680644editdlrm
show_window.hpp13080644editdlrm
start_dir.hpp10260644editdlrm
terminate.hpp13290644editdlrm
wait_for_exit.hpp40480644editdlrm
wait_group.hpp43370644editdlrm
Edit: /usr/include/boost/process/detail/windows/file_descriptor.hpp (3747B)
// Copyright (c) 2016 Klemens D. Morgenstern // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PROCESS_DETAIL_WINDOWS_FILE_DESCRIPTOR_HPP_ #define BOOST_PROCESS_DETAIL_WINDOWS_FILE_DESCRIPTOR_HPP_ #include #include #include #include #include #include namespace boost { namespace process { namespace detail { namespace windows { struct file_descriptor { enum mode_t { read = 1, write = 2, read_write = 3 }; static ::boost::winapi::DWORD_ desired_access(mode_t mode) { switch(mode) { case read: return ::boost::winapi::GENERIC_READ_; case write: return ::boost::winapi::GENERIC_WRITE_; case read_write: return ::boost::winapi::GENERIC_READ_ | ::boost::winapi::GENERIC_WRITE_; default: return 0u; } } file_descriptor() = default; file_descriptor(const boost::filesystem::path& p, mode_t mode = read_write) : file_descriptor(p.native(), mode) { } file_descriptor(const std::string & path , mode_t mode = read_write) #if defined(BOOST_NO_ANSI_APIS) : file_descriptor(::boost::process::detail::convert(path), mode) #else : file_descriptor(path.c_str(), mode) #endif {} file_descriptor(const std::wstring & path, mode_t mode = read_write) : file_descriptor(path.c_str(), mode) {} file_descriptor(const char* path, mode_t mode = read_write) #if defined(BOOST_NO_ANSI_APIS) : file_descriptor(std::string(path), mode) #else : _handle( ::boost::winapi::create_file( path, desired_access(mode), ::boost::winapi::FILE_SHARE_READ_ | ::boost::winapi::FILE_SHARE_WRITE_, nullptr, ::boost::winapi::OPEN_ALWAYS_, ::boost::winapi::FILE_ATTRIBUTE_NORMAL_, nullptr )) #endif { } file_descriptor(const wchar_t * path, mode_t mode = read_write) : _handle( ::boost::winapi::create_file( path, desired_access(mode), ::boost::winapi::FILE_SHARE_READ_ | ::boost::winapi::FILE_SHARE_WRITE_, nullptr, ::boost::winapi::OPEN_ALWAYS_, ::boost::winapi::FILE_ATTRIBUTE_NORMAL_, nullptr )) { } file_descriptor(const file_descriptor & ) = delete; file_descriptor(file_descriptor &&other) : _handle( boost::exchange(other._handle, ::boost::winapi::INVALID_HANDLE_VALUE_) ) { } file_descriptor& operator=(const file_descriptor & ) = delete; file_descriptor& operator=(file_descriptor &&other) { if (_handle != ::boost::winapi::INVALID_HANDLE_VALUE_) ::boost::winapi::CloseHandle(_handle); _handle = boost::exchange(other._handle, ::boost::winapi::INVALID_HANDLE_VALUE_); } ~file_descriptor() { if (_handle != ::boost::winapi::INVALID_HANDLE_VALUE_) ::boost::winapi::CloseHandle(_handle); } ::boost::winapi::HANDLE_ handle() const { return _handle;} private: ::boost::winapi::HANDLE_ _handle = ::boost::winapi::INVALID_HANDLE_VALUE_; }; }}}} #endif /* BOOST_PROCESS_DETAIL_WINDOWS_FILE_DESCRIPTOR_HPP_ */