|
||||
File indexing completed on 2025-01-30 09:58:04
0001 // Copyright (c) 2016 Klemens D. Morgenstern 0002 // 0003 // Distributed under the Boost Software License, Version 1.0. (See accompanying 0004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 0005 #ifndef BOOST_PROCESS_POSIX_HPP_ 0006 #define BOOST_PROCESS_POSIX_HPP_ 0007 0008 #include <boost/process/detail/posix/fd.hpp> 0009 #include <boost/process/detail/posix/handler.hpp> 0010 #include <boost/process/detail/posix/use_vfork.hpp> 0011 #include <boost/process/detail/posix/signal.hpp> 0012 0013 0014 /** \file boost/process/posix.hpp 0015 * 0016 * Header which provides the posix extensions. 0017 \xmlonly 0018 <programlisting> 0019 namespace boost { 0020 namespace process { 0021 namespace posix { 0022 <emphasis>unspecified</emphasis> <globalname alt="boost::process::posix::fd">fd</globalname>; 0023 <emphasis>unspecified</emphasis> <globalname alt="boost::process::posix::sig">sig</globalname>; 0024 <emphasis>unspecified</emphasis> <globalname alt="boost::process::posix::use_vfork">use_vfork</globalname>; 0025 } 0026 } 0027 } 0028 </programlisting> 0029 * \endxmlonly 0030 * \warning Only available on posix. See the documentation of [fork](http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html), 0031 * [execve](http://pubs.opengroup.org/onlinepubs/009695399/functions/execve.html) and 0032 * [vfork](http://pubs.opengroup.org/onlinepubs/009695399/functions/vfork.html). 0033 * 0034 */ 0035 0036 namespace boost { namespace process { 0037 0038 ///Namespace containing the posix extensions. 0039 namespace posix { 0040 0041 /** This property lets you modify file-descriptors other than the standard ones (0,1,2). 0042 * 0043 * It provides the functions `bind`, which implements [dup2](http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup.html) 0044 * and [close](http://pubs.opengroup.org/onlinepubs/9699919799/functions/close.html). 0045 * 0046 * Close can also be called with a range of file-descriptors to be closed. 0047 * 0048 */ 0049 constexpr ::boost::process::detail::posix::fd_ fd; 0050 0051 /** This property lets you modify the handling of `SIGCHLD` for this call. It will be reset afterwards. 0052 0053 It can be set to default, by the expression `sig.dfl()`, set to ignore with `sig.ign()` or 0054 assigned a custom handler. A custom handler must have the type `sighandler_t`and can be assigned with the following syntax: 0055 0056 \code{.cpp} 0057 sig = handler; 0058 sig(handler); 0059 \endcode 0060 0061 \warning @ref spawn will automatically use `sig.ign()`, which will override if you pass a custom handler. 0062 */ 0063 constexpr ::boost::process::detail::posix::sig_ sig; 0064 /** This property will replace the usage of [fork](http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html) by [vfork](http://pubs.opengroup.org/onlinepubs/009695399/functions/vfork.html). 0065 \note `vfork` is no longer an official part of the posix standard. 0066 0067 */ 0068 constexpr ::boost::process::detail::posix::use_vfork_ use_vfork; 0069 0070 0071 using ::boost::process::detail::posix::sighandler_t; 0072 0073 }}} 0074 0075 #endif /* BOOST_PROCESS_POSIX_HPP_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |