1 // Copyright (c) 2006, 2007 Julio M. Merino Vidal
2 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
3 // Copyright (c) 2009 Boris Schaeling
4 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling
5 // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_PROCESS_POSIX_CHILD_HPP
11 #define BOOST_PROCESS_POSIX_CHILD_HPP
14 #include <system_error>
16 namespace boost { namespace process { namespace detail { namespace posix {
18 typedef ::pid_t pid_t;
23 explicit child_handle(int pid) : pid(pid)
26 child_handle() = default;
27 ~child_handle() = default;
29 child_handle(const child_handle & c) = delete;
30 child_handle(child_handle && c) : pid(c.pid)
34 child_handle &operator=(const child_handle & c) = delete;
35 child_handle &operator=(child_handle && c)
46 bool in_group() const {return true;}
47 bool in_group(std::error_code&) const noexcept {return true;}
49 typedef int process_handle_t;
50 process_handle_t process_handle() const { return pid; }