summaryrefslogtreecommitdiff
path: root/boost/process/detail/windows/group_handle.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:11:01 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:11:01 +0900
commit3fdc3e5ee96dca5b11d1694975a65200787eab86 (patch)
tree5c1733853892b8397d67706fa453a9bd978d2102 /boost/process/detail/windows/group_handle.hpp
parent88e602c57797660ebe0f9e15dbd64c1ff16dead3 (diff)
downloadboost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.gz
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.bz2
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.zip
Imported Upstream version 1.66.0upstream/1.66.0
Diffstat (limited to 'boost/process/detail/windows/group_handle.hpp')
-rw-r--r--boost/process/detail/windows/group_handle.hpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/boost/process/detail/windows/group_handle.hpp b/boost/process/detail/windows/group_handle.hpp
index e289263cad..5025c0d245 100644
--- a/boost/process/detail/windows/group_handle.hpp
+++ b/boost/process/detail/windows/group_handle.hpp
@@ -7,14 +7,14 @@
#define BOOST_PROCESS_DETAIL_WINDOWS_GROUP_HPP_
#include <boost/process/detail/windows/handler.hpp>
-#include <boost/detail/winapi/jobs.hpp>
+#include <boost/winapi/jobs.hpp>
#include <boost/process/detail/windows/child_handle.hpp>
#include <boost/process/detail/windows/job_workaround.hpp>
#include <system_error>
namespace boost { namespace process { namespace detail { namespace windows {
-inline bool break_away_enabled(::boost::detail::winapi::HANDLE_ h)
+inline bool break_away_enabled(::boost::winapi::HANDLE_ h)
{
workaround::JOBOBJECT_EXTENDED_LIMIT_INFORMATION_ info;
@@ -29,7 +29,7 @@ inline bool break_away_enabled(::boost::detail::winapi::HANDLE_ h)
return (info.BasicLimitInformation.LimitFlags & workaround::JOB_OBJECT_LIMIT_BREAKAWAY_OK_) != 0;
}
-inline void enable_break_away(::boost::detail::winapi::HANDLE_ h)
+inline void enable_break_away(::boost::winapi::HANDLE_ h)
{
workaround::JOBOBJECT_EXTENDED_LIMIT_INFORMATION_ info;
@@ -54,7 +54,7 @@ inline void enable_break_away(::boost::detail::winapi::HANDLE_ h)
throw_last_error("SetInformationJobObject() failed");
}
-inline void enable_break_away(::boost::detail::winapi::HANDLE_ h, std::error_code & ec)
+inline void enable_break_away(::boost::winapi::HANDLE_ h, std::error_code & ec)
{
workaround::JOBOBJECT_EXTENDED_LIMIT_INFORMATION_ info;
@@ -91,9 +91,9 @@ inline void enable_break_away(::boost::detail::winapi::HANDLE_ h, std::error_cod
struct group_handle
{
- ::boost::detail::winapi::HANDLE_ _job_object;
+ ::boost::winapi::HANDLE_ _job_object;
- typedef ::boost::detail::winapi::HANDLE_ handle_t;
+ typedef ::boost::winapi::HANDLE_ handle_t;
handle_t handle() const { return _job_object; }
explicit group_handle(handle_t h) :
@@ -103,52 +103,52 @@ struct group_handle
}
- group_handle() : group_handle(::boost::detail::winapi::CreateJobObjectA(nullptr, nullptr))
+ group_handle() : group_handle(::boost::winapi::CreateJobObjectA(nullptr, nullptr))
{
}
~group_handle()
{
- ::boost::detail::winapi::CloseHandle(_job_object);
+ ::boost::winapi::CloseHandle(_job_object);
}
group_handle(const group_handle & c) = delete;
group_handle(group_handle && c) : _job_object(c._job_object)
{
- c._job_object = ::boost::detail::winapi::invalid_handle_value;
+ c._job_object = ::boost::winapi::invalid_handle_value;
}
group_handle &operator=(const group_handle & c) = delete;
group_handle &operator=(group_handle && c)
{
- ::boost::detail::winapi::CloseHandle(_job_object);
+ ::boost::winapi::CloseHandle(_job_object);
_job_object = c._job_object;
- c._job_object = ::boost::detail::winapi::invalid_handle_value;
+ c._job_object = ::boost::winapi::invalid_handle_value;
return *this;
}
void add(handle_t proc)
{
- if (!::boost::detail::winapi::AssignProcessToJobObject(_job_object, proc))
+ if (!::boost::winapi::AssignProcessToJobObject(_job_object, proc))
throw_last_error();
}
void add(handle_t proc, std::error_code & ec) noexcept
{
- if (!::boost::detail::winapi::AssignProcessToJobObject(_job_object, proc))
+ if (!::boost::winapi::AssignProcessToJobObject(_job_object, proc))
ec = get_last_error();
}
bool has(handle_t proc)
{
- ::boost::detail::winapi::BOOL_ is;
- if (!::boost::detail::winapi::IsProcessInJob(proc, _job_object, &is))
+ ::boost::winapi::BOOL_ is;
+ if (!::boost::winapi::IsProcessInJob(proc, _job_object, &is))
throw_last_error();
return is!=0;
}
bool has(handle_t proc, std::error_code & ec) noexcept
{
- ::boost::detail::winapi::BOOL_ is;
- if (!::boost::detail::winapi::IsProcessInJob(proc, _job_object, &is))
+ ::boost::winapi::BOOL_ is;
+ if (!::boost::winapi::IsProcessInJob(proc, _job_object, &is))
ec = get_last_error();
return is!=0;
}
@@ -162,13 +162,13 @@ struct group_handle
inline void terminate(const group_handle &p)
{
- if (!::boost::detail::winapi::TerminateJobObject(p.handle(), EXIT_FAILURE))
+ if (!::boost::winapi::TerminateJobObject(p.handle(), EXIT_FAILURE))
boost::process::detail::throw_last_error("TerminateJobObject() failed");
}
inline void terminate(const group_handle &p, std::error_code &ec) noexcept
{
- if (!::boost::detail::winapi::TerminateJobObject(p.handle(), EXIT_FAILURE))
+ if (!::boost::winapi::TerminateJobObject(p.handle(), EXIT_FAILURE))
ec = boost::process::detail::get_last_error();
else
ec.clear();
@@ -176,8 +176,8 @@ inline void terminate(const group_handle &p, std::error_code &ec) noexcept
inline bool in_group()
{
- ::boost::detail::winapi::BOOL_ res;
- if (!::boost::detail::winapi::IsProcessInJob(boost::detail::winapi::GetCurrentProcess(), nullptr, &res))
+ ::boost::winapi::BOOL_ res;
+ if (!::boost::winapi::IsProcessInJob(boost::winapi::GetCurrentProcess(), nullptr, &res))
throw_last_error("IsProcessInJob failed");
return res!=0;