123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- #ifndef BOOST_PROCESS_CHILD_HPP
- #define BOOST_PROCESS_CHILD_HPP
- #include <boost/process/detail/config.hpp>
- #include <boost/process/detail/child_decl.hpp>
- #include <boost/process/detail/execute_impl.hpp>
- #if defined(BOOST_POSIX_API)
- #include <boost/process/posix.hpp>
- #endif
- namespace boost {
- namespace process {
- template<typename ...Args>
- child::child(Args&&...args)
- : child(::boost::process::detail::execute_impl(std::forward<Args>(args)...)) {}
- typedef ::boost::process::detail::api::pid_t pid_t;
- #if defined(BOOST_PROCESS_DOXYGEN)
- class child
- {
-
- typedef platform_specific native_handle_t;
-
- explicit child(pid_t & pid) : _child_handle(pid) {};
-
- child(child && lhs);
-
- template<typename ...Args>
- explicit child(Args&&...args);
-
- child() = default;
-
- child& operator=(child && lhs);
-
- void detach();
-
- void join();
-
- bool joinable();
-
- ~child();
-
- native_handle_t native_handle() const;
-
- int exit_code() const;
-
- pid_t id() const;
-
- int native_exit_code() const;
-
- bool running();
-
- bool running(std::error_code & ec) noexcept;
-
- void wait();
-
- void wait(std::error_code & ec) noexcept;
-
- template< class Rep, class Period >
- bool wait_for (const std::chrono::duration<Rep, Period>& rel_time);
-
- bool wait_for (const std::chrono::duration<Rep, Period>& rel_time, std::error_code & ec) noexcept;
-
- template< class Clock, class Duration >
- bool wait_until(const std::chrono::time_point<Clock, Duration>& timeout_time );
-
- bool wait_until(const std::chrono::time_point<Clock, Duration>& timeout_time, std::error_code & ec) noexcept;
-
- bool valid() const;
-
- explicit operator bool() const;
-
- bool in_group() const;
-
- bool in_group(std::error_code & ec) const noexcept;
-
- void terminate();
-
- void terminate(std::error_code & ec) noexcept;
- };
- #endif
- }}
- #endif
|