![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /proc/thread-self/root/usr/include/boost/process/detail/windows/ |
Upload File : |
// 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_GROUP_REF_HPP_ #define BOOST_PROCESS_DETAIL_WINDOWS_GROUP_REF_HPP_ #include <boost/winapi/process.hpp> #include <boost/process/detail/config.hpp> #include <boost/process/detail/windows/group_handle.hpp> #include <boost/process/detail/used_handles.hpp> #include <boost/process/detail/windows/handler.hpp> namespace boost { namespace process { namespace detail { namespace windows { struct group_ref : handler_base_ext, ::boost::process::detail::uses_handles { ::boost::winapi::HANDLE_ handle; ::boost::winapi::HANDLE_ get_used_handles() const { return handle; } explicit group_ref(group_handle &g) : handle(g.handle()) {} template <class Executor> void on_setup(Executor& exec) const { //I can only enable this if the current process supports breakaways. if (in_group() && break_away_enabled(nullptr)) exec.creation_flags |= boost::winapi::CREATE_BREAKAWAY_FROM_JOB_; } template <class Executor> void on_success(Executor& exec) const { if (!::boost::winapi::AssignProcessToJobObject(handle, exec.proc_info.hProcess)) exec.set_error(::boost::process::detail::get_last_error(), "AssignProcessToJobObject() failed."); } }; }}}} #endif /* BOOST_PROCESS_DETAIL_WINDOWS_GROUP_HPP_ */