123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #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>
- 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
- #if defined(BOOST_PROCESS_V2_HEADER_ONLY)
- #include <boost/process/v2/impl/pid.ipp>
- #endif
- #endif
|