1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #ifndef BOOST_PROCESS_V2_PID_HPP
- #define BOOST_PROCESS_V2_PID_HPP
- #include <boost/process/v2/detail/config.hpp>
- #include <boost/process/v2/detail/throw_error.hpp>
- #include <vector>
- BOOST_PROCESS_V2_BEGIN_NAMESPACE
- #if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined pid_type;
- #else
- #if defined(BOOST_PROCESS_V2_WINDOWS)
- typedef unsigned long pid_type;
- #else
- typedef int pid_type;
- #endif
- #endif
- #if (defined(BOOST_PROCESS_V2_WINDOWS) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__sun))
- constexpr static pid_type root_pid = 0;
- #elif (defined(__APPLE__) && defined(__MACH__) || defined(__linux__) || defined(__ANDROID__) || defined(__OpenBSD__))
- constexpr static pid_type root_pid = 1;
- #endif
- BOOST_PROCESS_V2_DECL pid_type current_pid();
- BOOST_PROCESS_V2_DECL std::vector<pid_type> all_pids(boost::system::error_code & ec);
- BOOST_PROCESS_V2_DECL std::vector<pid_type> all_pids();
- BOOST_PROCESS_V2_DECL pid_type parent_pid(pid_type pid, boost::system::error_code & ec);
- BOOST_PROCESS_V2_DECL pid_type parent_pid(pid_type pid);
- BOOST_PROCESS_V2_DECL std::vector<pid_type> child_pids(pid_type pid, boost::system::error_code & ec);
- BOOST_PROCESS_V2_DECL std::vector<pid_type> child_pids(pid_type pid);
- BOOST_PROCESS_V2_END_NAMESPACE
- #endif
|