File indexing completed on 2025-01-18 09:50:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef BOOST_PROCESS_SPAWN_HPP
0018 #define BOOST_PROCESS_SPAWN_HPP
0019
0020 #include <boost/process/detail/config.hpp>
0021 #include <boost/process/detail/child_decl.hpp>
0022 #include <boost/process/detail/execute_impl.hpp>
0023 #include <boost/process/detail/async_handler.hpp>
0024
0025 #if defined(BOOST_POSIX_API)
0026 #include <boost/process/posix.hpp>
0027 #endif
0028
0029 namespace boost {
0030
0031 namespace process {
0032
0033 namespace detail {
0034
0035 }
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 template<typename ...Args>
0049 inline void spawn(Args && ...args)
0050 {
0051 typedef typename ::boost::process::detail::has_async_handler<Args...>::type
0052 has_async;
0053
0054
0055 static_assert(
0056 !has_async::value,
0057 "Spawn cannot wait for exit, so async properties cannot be used");
0058
0059 auto c = ::boost::process::detail::execute_impl(
0060 #if defined(BOOST_POSIX_API)
0061 ::boost::process::posix::sig.ign(),
0062 #endif
0063 std::forward<Args>(args)...);
0064 c.detach();
0065 }
0066
0067 }}
0068 #endif
0069