1 // Copyright (c) 2016 Klemens D. Morgenstern
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_PROCESS_DETAIL_POSIX_ENV_INIT_HPP_
8 #define BOOST_PROCESS_DETAIL_POSIX_ENV_INIT_HPP_
11 #include <boost/process/detail/config.hpp>
12 #include <boost/process/detail/posix/handler.hpp>
13 #include <boost/process/environment.hpp>
15 namespace boost { namespace process { namespace detail { namespace posix {
17 template<typename Char>
21 struct env_init<char> : handler_base_ext
23 boost::process::environment env;
25 env_init(boost::process::environment && env) : env(std::move(env)) {};
26 env_init(const boost::process::environment & env) : env(env) {};
29 template <class Executor>
30 void on_setup(Executor &exec) const
32 exec.env = env._env_impl;
41 #endif /* BOOST_PROCESS_DETAIL_WINDOWS_ENV_INIT_HPP_ */