1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Reference</title> 6<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../process.html" title="Chapter 29. Boost.Process"> 10<link rel="prev" href="../boost_process/faq.html" title="Frequently Asked Questions"> 11<link rel="next" href="../boost/process/args.html" title="Global args"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td> 16<td align="center"><a href="../../../index.html">Home</a></td> 17<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="../boost_process/faq.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../process.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost/process/args.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="section"> 27<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 28<a name="process.reference"></a>Reference</h2></div></div></div> 29<div class="toc"><dl class="toc"> 30<dt><span class="section"><a href="reference.html#header.boost.process.args_hpp">Header <boost/process/args.hpp></a></span></dt> 31<dt><span class="section"><a href="reference.html#header.boost.process.async_hpp">Header <boost/process/async.hpp></a></span></dt> 32<dt><span class="section"><a href="reference.html#header.boost.process.async_pipe_hpp">Header <boost/process/async_pipe.hpp></a></span></dt> 33<dt><span class="section"><a href="reference.html#header.boost.process.async_system_hpp">Header <boost/process/async_system.hpp></a></span></dt> 34<dt><span class="section"><a href="reference.html#header.boost.process.child_hpp">Header <boost/process/child.hpp></a></span></dt> 35<dt><span class="section"><a href="reference.html#header.boost.process.cmd_hpp">Header <boost/process/cmd.hpp></a></span></dt> 36<dt><span class="section"><a href="reference.html#header.boost.process.env_hpp">Header <boost/process/env.hpp></a></span></dt> 37<dt><span class="section"><a href="reference.html#header.boost.process.environment_hpp">Header <boost/process/environment.hpp></a></span></dt> 38<dt><span class="section"><a href="reference.html#header.boost.process.error_hpp">Header <boost/process/error.hpp></a></span></dt> 39<dt><span class="section"><a href="reference.html#header.boost.process.exception_hpp">Header <boost/process/exception.hpp></a></span></dt> 40<dt><span class="section"><a href="reference.html#header.boost.process.exe_hpp">Header <boost/process/exe.hpp></a></span></dt> 41<dt><span class="section"><a href="reference.html#header.boost.process.extend_hpp">Header <boost/process/extend.hpp></a></span></dt> 42<dt><span class="section"><a href="reference.html#header.boost.process.group_hpp">Header <boost/process/group.hpp></a></span></dt> 43<dt><span class="section"><a href="reference.html#header.boost.process.handles_hpp">Header <boost/process/handles.hpp></a></span></dt> 44<dt><span class="section"><a href="reference.html#header.boost.process.io_hpp">Header <boost/process/io.hpp></a></span></dt> 45<dt><span class="section"><a href="reference.html#header.boost.process.locale_hpp">Header <boost/process/locale.hpp></a></span></dt> 46<dt><span class="section"><a href="reference.html#header.boost.process.pipe_hpp">Header <boost/process/pipe.hpp></a></span></dt> 47<dt><span class="section"><a href="reference.html#header.boost.process.posix_hpp">Header <boost/process/posix.hpp></a></span></dt> 48<dt><span class="section"><a href="reference.html#header.boost.process.search_path_hpp">Header <boost/process/search_path.hpp></a></span></dt> 49<dt><span class="section"><a href="reference.html#header.boost.process.shell_hpp">Header <boost/process/shell.hpp></a></span></dt> 50<dt><span class="section"><a href="reference.html#header.boost.process.spawn_hpp">Header <boost/process/spawn.hpp></a></span></dt> 51<dt><span class="section"><a href="reference.html#header.boost.process.start_dir_hpp">Header <boost/process/start_dir.hpp></a></span></dt> 52<dt><span class="section"><a href="reference.html#header.boost.process.system_hpp">Header <boost/process/system.hpp></a></span></dt> 53<dt><span class="section"><a href="reference.html#header.boost.process.windows_hpp">Header <boost/process/windows.hpp></a></span></dt> 54</dl></div> 55<div class="section"> 56<div class="titlepage"><div><div><h3 class="title"> 57<a name="header.boost.process.args_hpp"></a>Header <<a href="../../../../../boost/process/args.hpp" target="_top">boost/process/args.hpp</a>></h3></div></div></div> 58<p>This header provides the <a class="link" href="../boost/process/args.html" title="Global args">args</a> property. It also provides the alternative name <a class="link" href="../boost/process/argv.html" title="Global argv">argv</a> .</p> 59<p> 60</p> 61<pre class="programlisting"> 62<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 63 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 64 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/args.html" title="Global args">args</a><span class="special">;</span> 65 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/argv.html" title="Global argv">argv</a><span class="special">;</span> 66 <span class="special">}</span> 67<span class="special">}</span> 68</pre> 69<p> 70 </p> 71</div> 72<div class="section"> 73<div class="titlepage"><div><div><h3 class="title"> 74<a name="header.boost.process.async_hpp"></a>Header <<a href="../../../../../boost/process/async.hpp" target="_top">boost/process/async.hpp</a>></h3></div></div></div> 75<p>The header which provides the basic asynchrounous features. It provides the on_exit property, which allows callbacks when the process exits. It also implements the necessary traits for passing an boost::asio::io_context, which is needed for asynchronous communication.</p> 76<p>It also pulls the <a href="http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/buffer.html" target="_top">boost::asio::buffer</a> into the boost::process namespace for convenience.</p> 77<p> 78</p> 79<pre class="programlisting"> 80<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 81 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 82 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a href="http://www.boost.org/doc/libs/1_61_0/doc/html/boost_asio/reference/buffer.html" target="_top"><span class="identifier">buffer</span></a><span class="special">;</span> 83 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/on_exit.html" title="Global on_exit">on_exit</a><span class="special">;</span> 84 <span class="special">}</span> 85<span class="special">}</span> 86</pre> 87<p> 88 89 </p> 90</div> 91<div class="section"> 92<div class="titlepage"><div><div><h3 class="title"> 93<a name="header.boost.process.async_pipe_hpp"></a>Header <<a href="../../../../../boost/process/async_pipe.hpp" target="_top">boost/process/async_pipe.hpp</a>></h3></div></div></div> 94<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 95 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 96 <span class="keyword">class</span> <a class="link" href="../boost/process/async_pipe.html" title="Class async_pipe">async_pipe</a><span class="special">;</span> 97 <span class="special">}</span> 98<span class="special">}</span></pre> 99</div> 100<div class="section"> 101<div class="titlepage"><div><div><h3 class="title"> 102<a name="header.boost.process.async_system_hpp"></a>Header <<a href="../../../../../boost/process/async_system.hpp" target="_top">boost/process/async_system.hpp</a>></h3></div></div></div> 103<p>Defines the asynchrounous version of the system function. </p> 104<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 105 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 106 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> ExitHandler<span class="special">,</span> <span class="keyword">typename</span> <span class="special">...</span> Args<span class="special">></span> 107 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/async_system.html" title="Function template async_system"><span class="identifier">async_system</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="special">&</span><span class="special">,</span> <span class="identifier">ExitHandler</span> <span class="special">&&</span><span class="special">,</span> 108 <span class="identifier">Args</span> <span class="special">&&</span><span class="special">...</span><span class="special">)</span><span class="special">;</span> 109 <span class="special">}</span> 110<span class="special">}</span></pre> 111</div> 112<div class="section"> 113<div class="titlepage"><div><div><h3 class="title"> 114<a name="header.boost.process.child_hpp"></a>Header <<a href="../../../../../boost/process/child.hpp" target="_top">boost/process/child.hpp</a>></h3></div></div></div> 115<p>Defines a child process class. </p> 116<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 117 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 118 <span class="keyword">class</span> <a class="link" href="../boost/process/child.html" title="Class child">child</a><span class="special">;</span> 119 120 <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a name="boost.process.pid_t"></a><span class="identifier">pid_t</span><span class="special">;</span> <span class="comment">// Typedef for the type of an pid_t. </span> 121 <span class="special">}</span> 122<span class="special">}</span></pre> 123</div> 124<div class="section"> 125<div class="titlepage"><div><div><h3 class="title"> 126<a name="header.boost.process.cmd_hpp"></a>Header <<a href="../../../../../boost/process/cmd.hpp" target="_top">boost/process/cmd.hpp</a>></h3></div></div></div> 127<p>This header provides the <a class="link" href="../boost/process/cmd.html" title="Global cmd">cmd</a> property.</p> 128<p> 129</p> 130<pre class="programlisting"> 131<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 132 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 133 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/cmd.html" title="Global cmd">cmd</a><span class="special">;</span> 134 <span class="special">}</span> 135<span class="special">}</span> 136</pre> 137<p> 138 </p> 139</div> 140<div class="section"> 141<div class="titlepage"><div><div><h3 class="title"> 142<a name="header.boost.process.env_hpp"></a>Header <<a href="../../../../../boost/process/env.hpp" target="_top">boost/process/env.hpp</a>></h3></div></div></div> 143<p>This header which provides the <code class="computeroutput">env</code> property. It allows the modification of the environment the child process will run in, in a functional style.</p> 144<p> 145</p> 146<pre class="programlisting"> 147<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 148 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 149 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/env.html" title="Global env">env</a><span class="special">;</span> 150 <span class="special">}</span> 151<span class="special">}</span> 152</pre> 153<p> 154 </p> 155<p>For additional information see the platform documentations:</p> 156<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 157<li class="listitem"><p><a href="https://msdn.microsoft.com/en-US/library/windows/desktop/ms682653.aspx" target="_top">windows</a></p></li> 158<li class="listitem"><p><a href="http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html" target="_top">posix</a> </p></li> 159</ul></div> 160<p> 161</p> 162</div> 163<div class="section"> 164<div class="titlepage"><div><div><h3 class="title"> 165<a name="header.boost.process.environment_hpp"></a>Header <<a href="../../../../../boost/process/environment.hpp" target="_top">boost/process/environment.hpp</a>></h3></div></div></div> 166<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 167 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 168 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Char<span class="special">></span> <span class="keyword">class</span> <a class="link" href="../boost/process/basic_environment.html" title="Class template basic_environment">basic_environment</a><span class="special">;</span> 169 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Char<span class="special">></span> <span class="keyword">class</span> <a class="link" href="../boost/process/basic_native_environment.html" title="Class template basic_native_environment">basic_native_environment</a><span class="special">;</span> 170 171 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_native_environment.html" title="Class template basic_native_environment">basic_native_environment</a><span class="special"><</span> <span class="keyword">char</span> <span class="special">></span> <a name="boost.process.native_environment"></a><span class="identifier">native_environment</span><span class="special">;</span> <span class="comment">// Definition of the environment for the current process. </span> 172 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_native_environment.html" title="Class template basic_native_environment">basic_native_environment</a><span class="special"><</span> <span class="keyword">wchar_t</span> <span class="special">></span> <a name="boost.process.wnative_environment"></a><span class="identifier">wnative_environment</span><span class="special">;</span> <span class="comment">// Definition of the environment for the current process. </span> 173 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_environment.html" title="Class template basic_environment">basic_environment</a><span class="special"><</span> <span class="keyword">char</span> <span class="special">></span> <a name="boost.process.environment"></a><span class="identifier">environment</span><span class="special">;</span> <span class="comment">// Type definition to hold a seperate environment. </span> 174 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_environment.html" title="Class template basic_environment">basic_environment</a><span class="special"><</span> <span class="keyword">wchar_t</span> <span class="special">></span> <a name="boost.process.wenvironment"></a><span class="identifier">wenvironment</span><span class="special">;</span> <span class="comment">// Type definition to hold a seperate environment. </span> 175 <span class="special">}</span> 176 <span class="keyword">namespace</span> <span class="identifier">this_process</span> <span class="special">{</span> 177 178 <span class="comment">// Get the process id of the current process. </span> 179 <span class="keyword">int</span> <a name="boost.this_process.get_id"></a><span class="identifier">get_id</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 180 181 <span class="comment">// Get the native handle of the current process. </span> 182 <span class="identifier">native_handle_type</span> <a name="boost.this_process.native_handle"></a><span class="identifier">native_handle</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 183 184 <span class="comment">// Get the enviroment of the current process. </span> 185 <span class="identifier">native_environment</span> <a name="boost.this_process.environment"></a><span class="identifier">environment</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 186 187 <span class="comment">// Get the enviroment of the current process. </span> 188 <span class="identifier">wnative_environment</span> <a name="boost.this_process.wenvironment"></a><span class="identifier">wenvironment</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 189 190 <span class="comment">// Get the path environment variable of the current process runs. </span> 191 <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">></span> <a name="boost.this_process.path"></a><span class="identifier">path</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 192 <span class="special">}</span> 193<span class="special">}</span></pre> 194</div> 195<div class="section"> 196<div class="titlepage"><div><div><h3 class="title"> 197<a name="header.boost.process.error_hpp"></a>Header <<a href="../../../../../boost/process/error.hpp" target="_top">boost/process/error.hpp</a>></h3></div></div></div> 198<p>Header which provides the error properties. It allows to explicitly set the error handling, the properties are:</p> 199<p> 200</p> 201<pre class="programlisting"> 202<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 203 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 204 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/ignore_error.html" title="Global ignore_error">ignore_error</a><span class="special">;</span> 205 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/throw_on_error.html" title="Global throw_on_error">throw_on_error</a><span class="special">;</span> 206 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/error.html" title="Global error">error</a><span class="special">;</span> 207 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/error_ref.html" title="Global error_ref">error_ref</a><span class="special">;</span> 208 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/error_code.html" title="Global error_code">error_code</a><span class="special">;</span> 209 <span class="special">}</span> 210<span class="special">}</span> 211</pre> 212<p> 213 For error there are two aliases: error_ref and error_code </p> 214</div> 215<div class="section"> 216<div class="titlepage"><div><div><h3 class="title"> 217<a name="header.boost.process.exception_hpp"></a>Header <<a href="../../../../../boost/process/exception.hpp" target="_top">boost/process/exception.hpp</a>></h3></div></div></div> 218<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 219 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 220 <span class="keyword">struct</span> <a class="link" href="../boost/process/process_error.html" title="Struct process_error">process_error</a><span class="special">;</span> 221 <span class="special">}</span> 222<span class="special">}</span></pre> 223</div> 224<div class="section"> 225<div class="titlepage"><div><div><h3 class="title"> 226<a name="header.boost.process.exe_hpp"></a>Header <<a href="../../../../../boost/process/exe.hpp" target="_top">boost/process/exe.hpp</a>></h3></div></div></div> 227<p>Header which provides the exe property. 228</p> 229<pre class="programlisting"> 230<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 231 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 232 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/exe.html" title="Global exe">exe</a><span class="special">;</span> 233 <span class="special">}</span> 234<span class="special">}</span> 235</pre> 236<p> 237 </p> 238</div> 239<div class="section"> 240<div class="titlepage"><div><div><h3 class="title"> 241<a name="header.boost.process.extend_hpp"></a>Header <<a href="../../../../../boost/process/extend.hpp" target="_top">boost/process/extend.hpp</a>></h3></div></div></div> 242<p>This header which provides the types and functions provided for custom extensions.</p> 243<p> 244Please refer to the <a class="link" href="../boost_process/extend.html" title="Extensions">tutorial</a> for more details. 245 </p> 246<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 247 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 248 <span class="keyword">namespace</span> <span class="identifier">extend</span> <span class="special">{</span> 249 <span class="keyword">struct</span> <a class="link" href="../boost/process/extend/async_handler.html" title="Struct async_handler">async_handler</a><span class="special">;</span> 250 <span class="keyword">struct</span> <a class="link" href="../boost/process/extend/handler.html" title="Struct handler">handler</a><span class="special">;</span> 251 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Sequence<span class="special">></span> <span class="keyword">struct</span> <a class="link" href="../boost/process/extend/posix_executor.html" title="Struct template posix_executor">posix_executor</a><span class="special">;</span> 252 <span class="keyword">struct</span> <a class="link" href="../boost/process/extend/require_io_context.html" title="Struct require_io_context">require_io_context</a><span class="special">;</span> 253 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Char<span class="special">,</span> <span class="keyword">typename</span> Sequence<span class="special">></span> <span class="keyword">struct</span> <a class="link" href="../boost/process/extend/windows_executor.html" title="Struct template windows_executor">windows_executor</a><span class="special">;</span> 254 255 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/extend/on_setup.html" title="Global on_setup">on_setup</a><span class="special">;</span> <span class="comment">// This handler is invoked before the process in launched, to setup parameters. The required signature is <code class="computeroutput">void(Exec &)</code>, where <code class="computeroutput">Exec</code> is a template parameter. </span> 256 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/extend/on_error.html" title="Global on_error">on_error</a><span class="special">;</span> <span class="comment">// This handler is invoked if an error occured. The required signature is <code class="computeroutput">void(auto & exec, const std::error_code&)</code>, where <code class="computeroutput">Exec</code> is a template parameter. </span> 257 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/extend/on_success.html" title="Global on_success">on_success</a><span class="special">;</span> <span class="comment">// This handler is invoked if launching the process has succeeded. The required signature is <code class="computeroutput">void(auto & exec)</code>, where <code class="computeroutput">Exec</code> is a template parameter. </span> 258 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/extend/on_fork_error.html" title="Global on_fork_error">on_fork_error</a><span class="special">;</span> <span class="comment">// This handler is invoked if the fork failed. The required signature is <code class="computeroutput">void(auto & exec)</code>, where <code class="computeroutput">Exec</code> is a template parameter. </span> 259 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/extend/on_exec_setup.html" title="Global on_exec_setup">on_exec_setup</a><span class="special">;</span> <span class="comment">// This handler is invoked if the fork succeeded. The required signature is <code class="computeroutput">void(Exec &)</code>, where <code class="computeroutput">Exec</code> is a template parameter. </span> 260 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/extend/on_exec_error.html" title="Global on_exec_error">on_exec_error</a><span class="special">;</span> <span class="comment">// This handler is invoked if the exec call errored. The required signature is <code class="computeroutput">void(auto & exec)</code>, where <code class="computeroutput">Exec</code> is a template parameter. </span> 261 262 <span class="comment">// Helper function to get the last error code system-independent. </span> 263 <span class="identifier">std</span><span class="special">::</span><span class="identifier">error_code</span> <a name="boost.process.extend.get_last_error"></a><span class="identifier">get_last_error</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 264 <span class="keyword">void</span> <a class="link" href="../boost/process/extend/throw_last_error.html" title="Function throw_last_error"><span class="identifier">throw_last_error</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 265 <span class="keyword">void</span> <a class="link" href="../boost/process/extend/throw_last_error.html" title="Function throw_last_error"><span class="identifier">throw_last_error</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 266 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Sequence<span class="special">></span> 267 <span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="special">&</span> <a class="link" href="../boost/process/extend/get_io_context.html" title="Function template get_io_context"><span class="identifier">get_io_context</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Sequence</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 268 <span class="special">}</span> 269 <span class="special">}</span> 270<span class="special">}</span></pre> 271</div> 272<div class="section"> 273<div class="titlepage"><div><div><h3 class="title"> 274<a name="header.boost.process.group_hpp"></a>Header <<a href="../../../../../boost/process/group.hpp" target="_top">boost/process/group.hpp</a>></h3></div></div></div> 275<p>Defines a group process class. For additional information see the platform specific implementations:</p> 276<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 277<li class="listitem"><p><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms684161.aspx" target="_top">windows - job object</a></p></li> 278<li class="listitem"><p><a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/setpgid.html" target="_top">posix - process group</a> </p></li> 279</ul></div> 280<p> 281</p> 282<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 283 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 284 <span class="keyword">class</span> <a class="link" href="../boost/process/group.html" title="Class group">group</a><span class="special">;</span> 285 <span class="special">}</span> 286<span class="special">}</span></pre> 287</div> 288<div class="section"> 289<div class="titlepage"><div><div><h3 class="title"> 290<a name="header.boost.process.handles_hpp"></a>Header <<a href="../../../../../boost/process/handles.hpp" target="_top">boost/process/handles.hpp</a>></h3></div></div></div> 291<p>Defines functions to obtain handles of the current process and limit the amount for inherited ones. </p> 292<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 293 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 294 <span class="keyword">static</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/limit_handles.html" title="Global limit_handles">limit_handles</a><span class="special">;</span> 295 <span class="special">}</span> 296 <span class="keyword">namespace</span> <span class="identifier">this_process</span> <span class="special">{</span> 297 <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/this_process/native_handle_type.html" title="Type definition native_handle_type"><span class="identifier">native_handle_type</span></a><span class="special">;</span> 298 <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <span class="identifier">native_handle_type</span> <span class="special">></span> <a class="link" href="../boost/this_process/get_handles.html" title="Function get_handles"><span class="identifier">get_handles</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 299 <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <span class="identifier">native_handle_type</span> <span class="special">></span> <a class="link" href="../boost/this_process/get_handles.html" title="Function get_handles"><span class="identifier">get_handles</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 300 <span class="keyword">bool</span> <a class="link" href="../boost/this_process/is_stream_handle.html" title="Function is_stream_handle"><span class="identifier">is_stream_handle</span></a><span class="special">(</span><span class="identifier">native_handle_type</span><span class="special">)</span><span class="special">;</span> 301 <span class="keyword">bool</span> <a class="link" href="../boost/this_process/is_stream_handle.html" title="Function is_stream_handle"><span class="identifier">is_stream_handle</span></a><span class="special">(</span><span class="identifier">native_handle_type</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 302 <span class="special">}</span> 303<span class="special">}</span></pre> 304</div> 305<div class="section"> 306<div class="titlepage"><div><div><h3 class="title"> 307<a name="header.boost.process.io_hpp"></a>Header <<a href="../../../../../boost/process/io.hpp" target="_top">boost/process/io.hpp</a>></h3></div></div></div> 308<p>Header which provides the io properties. It provides the following properties:</p> 309<p> 310</p> 311<pre class="programlisting"> 312<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 313 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 314 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/close.html" title="Global close">close</a><span class="special">;</span> 315 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/null.html" title="Global null">null</a><span class="special">;</span> 316 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/std_in.html" title="Global std_in">std_in</a><span class="special">;</span> 317 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/std_out.html" title="Global std_out">std_out</a><span class="special">;</span> 318 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/std_err.html" title="Global std_err">std_err</a><span class="special">;</span> 319 <span class="special">}</span> 320<span class="special">}</span> 321</pre> 322<p> 323</p> 324<p><b>File I/O. </b></p> 325<p> 326The library allows full redirection of streams to files as shown below.</p> 327<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="identifier">log</span> <span class="special">=</span> <span class="string">"my_log_file.txt"</span><span class="special">;</span> 328<span class="identifier">boost</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="identifier">input</span> <span class="special">=</span> <span class="string">"input.txt"</span><span class="special">;</span> 329<span class="identifier">boost</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="identifier">output</span> <span class="special">=</span> <span class="string">"output.txt"</span><span class="special">;</span> 330<span class="identifier">system</span><span class="special">(</span><span class="string">"my_prog"</span><span class="special">,</span> <span class="identifier">std_out</span><span class="special">></span><span class="identifier">output</span><span class="special">,</span> <span class="identifier">std_in</span><span class="special"><</span><span class="identifier">input</span><span class="special">,</span> <span class="identifier">std_err</span><span class="special">></span><span class="identifier">log</span><span class="special">)</span><span class="special">;</span> 331</pre> 332<p><b>Synchronous Pipe I/O. </b></p> 333<p> 334Another way is to communicate through pipes.</p> 335<pre class="programlisting"><span class="identifier">pstream</span> <span class="identifier">str</span><span class="special">;</span> 336<span class="identifier">child</span> <span class="identifier">c</span><span class="special">(</span><span class="string">"my_prog"</span><span class="special">,</span> <span class="identifier">std_out</span> <span class="special">></span> <span class="identifier">str</span><span class="special">)</span><span class="special">;</span> 337 338<span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span> 339<span class="identifier">str</span> <span class="special">>></span> <span class="identifier">i</span><span class="special">;</span> 340</pre> 341<p>Note that the pipe may also be used between several processes, like this:</p> 342<pre class="programlisting"><span class="identifier">pipe</span> <span class="identifier">p</span><span class="special">;</span> 343<span class="identifier">child</span> <span class="identifier">c1</span><span class="special">(</span><span class="string">"nm"</span><span class="special">,</span> <span class="string">"a.out"</span><span class="special">,</span> <span class="identifier">std_out</span><span class="special">></span><span class="identifier">p</span><span class="special">)</span><span class="special">;</span> 344<span class="identifier">child</span> <span class="identifier">c2</span><span class="special">(</span><span class="string">"c++filt"</span><span class="special">,</span> <span class="identifier">std_in</span><span class="special"><</span><span class="identifier">p</span><span class="special">)</span><span class="special">;</span> 345</pre> 346<p><b>Asynchronous I/O. </b></p> 347<p> 348Utilizing <code class="computeroutput">boost.asio</code> asynchronous I/O is provided.</p> 349<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ios</span><span class="special">;</span> 350<span class="identifier">std</span><span class="special">::</span><span class="identifier">future</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="identifier">output</span><span class="special">;</span> 351<span class="identifier">system</span><span class="special">(</span><span class="string">"ls"</span><span class="special">,</span> <span class="identifier">std_out</span> <span class="special">></span> <span class="identifier">output</span><span class="special">,</span> <span class="identifier">ios</span><span class="special">)</span><span class="special">;</span> 352 353<span class="keyword">auto</span> <span class="identifier">res</span> <span class="special">=</span> <span class="identifier">fut</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 354</pre> 355<div class="note"><table border="0" summary="Note"> 356<tr> 357<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/src/images/note.png"></td> 358<th align="left">Note</th> 359</tr> 360<tr><td align="left" valign="top"><p><code class="computeroutput">boost/process/async.hpp</code> must also be included for this to work.</p></td></tr> 361</table></div> 362<p> 363</p> 364<p><b>Closing. </b></p> 365<p> 366Stream can be closed, so nothing can be read or written.</p> 367<pre class="programlisting"><span class="identifier">system</span><span class="special">(</span><span class="string">"foo"</span><span class="special">,</span> <span class="identifier">std_in</span><span class="special">.</span><span class="identifier">close</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span> 368</pre> 369<p><b>Null. </b></p> 370<p> 371Streams can be redirected to null, which means, that written date will be discarded and read data will only contain <code class="computeroutput">EOF</code>.</p> 372<pre class="programlisting"><span class="identifier">system</span><span class="special">(</span><span class="string">"b2"</span><span class="special">,</span> <span class="identifier">std_out</span> <span class="special">></span> <span class="identifier">null</span><span class="special">)</span><span class="special">;</span> 373</pre> 374<p> </p> 375</div> 376<div class="section"> 377<div class="titlepage"><div><div><h3 class="title"> 378<a name="header.boost.process.locale_hpp"></a>Header <<a href="../../../../../boost/process/locale.hpp" target="_top">boost/process/locale.hpp</a>></h3></div></div></div> 379<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 380 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 381 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">codecvt</span><span class="special"><</span> <span class="keyword">wchar_t</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">mbstate_t</span> <span class="special">></span> <a name="boost.process.codecvt_type"></a><span class="identifier">codecvt_type</span><span class="special">;</span> <span class="comment">// The internally used type for code conversion. </span> 382 383 <span class="comment">// Internally used error cateory for code conversion. </span> 384 <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">error_category</span> <span class="special">&</span> <a name="boost.process.codecvt_category"></a><span class="identifier">codecvt_category</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 385 386 <span class="comment">// Get a reference to the currently used code converter. </span> 387 <span class="keyword">const</span> <span class="identifier">codecvt_type</span> <span class="special">&</span> <a name="boost.process.codecvt"></a><span class="identifier">codecvt</span><span class="special">(</span><span class="special">)</span><span class="special">;</span> 388 389 <span class="comment">// Set the locale of the library. </span> 390 <span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span> <a name="boost.process.imbue"></a><span class="identifier">imbue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span> <span class="special">&</span> loc<span class="special">)</span><span class="special">;</span> 391 <span class="special">}</span> 392<span class="special">}</span></pre> 393</div> 394<div class="section"> 395<div class="titlepage"><div><div><h3 class="title"> 396<a name="header.boost.process.pipe_hpp"></a>Header <<a href="../../../../../boost/process/pipe.hpp" target="_top">boost/process/pipe.hpp</a>></h3></div></div></div> 397<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 398 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 399 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">CharT</span><span class="special">></span> <span class="special">></span> 400 <span class="keyword">class</span> <a class="link" href="../boost/process/basic_ipstream.html" title="Class template basic_ipstream">basic_ipstream</a><span class="special">;</span> 401 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">CharT</span><span class="special">></span> <span class="special">></span> 402 <span class="keyword">class</span> <a class="link" href="../boost/process/basic_opstream.html" title="Class template basic_opstream">basic_opstream</a><span class="special">;</span> 403 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">CharT</span><span class="special">></span> <span class="special">></span> 404 <span class="keyword">class</span> <a class="link" href="../boost/process/basic_pipe.html" title="Class template basic_pipe">basic_pipe</a><span class="special">;</span> 405 406 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">CharT</span><span class="special">></span> <span class="special">></span> 407 <span class="keyword">struct</span> <a class="link" href="../boost/process/basic_pipebuf.html" title="Struct template basic_pipebuf">basic_pipebuf</a><span class="special">;</span> 408 409 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">CharT</span><span class="special">></span> <span class="special">></span> 410 <span class="keyword">class</span> <a class="link" href="../boost/process/basic_pstream.html" title="Class template basic_pstream">basic_pstream</a><span class="special">;</span> 411 412 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_pipe.html" title="Class template basic_pipe">basic_pipe</a><span class="special"><</span> <span class="keyword">char</span> <span class="special">></span> <a name="boost.process.pipe"></a><span class="identifier">pipe</span><span class="special">;</span> 413 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_pipe.html" title="Class template basic_pipe">basic_pipe</a><span class="special"><</span> <span class="keyword">wchar_t</span> <span class="special">></span> <a name="boost.process.wpipe"></a><span class="identifier">wpipe</span><span class="special">;</span> 414 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_pipebuf.html" title="Struct template basic_pipebuf">basic_pipebuf</a><span class="special"><</span> <span class="keyword">char</span> <span class="special">></span> <a name="boost.process.pipebuf"></a><span class="identifier">pipebuf</span><span class="special">;</span> 415 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_pipebuf.html" title="Struct template basic_pipebuf">basic_pipebuf</a><span class="special"><</span> <span class="keyword">wchar_t</span> <span class="special">></span> <a name="boost.process.wpipebuf"></a><span class="identifier">wpipebuf</span><span class="special">;</span> 416 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_ipstream.html" title="Class template basic_ipstream">basic_ipstream</a><span class="special"><</span> <span class="keyword">char</span> <span class="special">></span> <a name="boost.process.ipstream"></a><span class="identifier">ipstream</span><span class="special">;</span> 417 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_ipstream.html" title="Class template basic_ipstream">basic_ipstream</a><span class="special"><</span> <span class="keyword">wchar_t</span> <span class="special">></span> <a name="boost.process.wipstream"></a><span class="identifier">wipstream</span><span class="special">;</span> 418 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_opstream.html" title="Class template basic_opstream">basic_opstream</a><span class="special"><</span> <span class="keyword">char</span> <span class="special">></span> <a name="boost.process.opstream"></a><span class="identifier">opstream</span><span class="special">;</span> 419 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_opstream.html" title="Class template basic_opstream">basic_opstream</a><span class="special"><</span> <span class="keyword">wchar_t</span> <span class="special">></span> <a name="boost.process.wopstream"></a><span class="identifier">wopstream</span><span class="special">;</span> 420 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_pstream.html" title="Class template basic_pstream">basic_pstream</a><span class="special"><</span> <span class="keyword">char</span> <span class="special">></span> <a name="boost.process.pstream"></a><span class="identifier">pstream</span><span class="special">;</span> 421 <span class="keyword">typedef</span> <a class="link" href="../boost/process/basic_pstream.html" title="Class template basic_pstream">basic_pstream</a><span class="special"><</span> <span class="keyword">wchar_t</span> <span class="special">></span> <a name="boost.process.wpstream"></a><span class="identifier">wpstream</span><span class="special">;</span> 422 <span class="special">}</span> 423<span class="special">}</span></pre> 424</div> 425<div class="section"> 426<div class="titlepage"><div><div><h3 class="title"> 427<a name="header.boost.process.posix_hpp"></a>Header <<a href="../../../../../boost/process/posix.hpp" target="_top">boost/process/posix.hpp</a>></h3></div></div></div> 428<p>Header which provides the posix extensions. 429</p> 430<pre class="programlisting"> 431<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 432 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 433 <span class="keyword">namespace</span> <span class="identifier">posix</span> <span class="special">{</span> 434 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/posix/fd.html" title="Global fd">fd</a><span class="special">;</span> 435 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/posix/sig.html" title="Global sig">sig</a><span class="special">;</span> 436 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/posix/use_vfork.html" title="Global use_vfork">use_vfork</a><span class="special">;</span> 437 <span class="special">}</span> 438 <span class="special">}</span> 439<span class="special">}</span> 440</pre> 441<p> 442 </p> 443<div class="warning"><table border="0" summary="Warning"> 444<tr> 445<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../doc/src/images/warning.png"></td> 446<th align="left">Warning</th> 447</tr> 448<tr><td align="left" valign="top"><p>Only available on posix. See the documentation of <a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html" target="_top">fork</a>, <a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/execve.html" target="_top">execve</a> and <a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/vfork.html" target="_top">vfork</a>. </p></td></tr> 449</table></div> 450<p> 451</p> 452</div> 453<div class="section"> 454<div class="titlepage"><div><div><h3 class="title"> 455<a name="header.boost.process.search_path_hpp"></a>Header <<a href="../../../../../boost/process/search_path.hpp" target="_top">boost/process/search_path.hpp</a>></h3></div></div></div> 456<p>Defines a function to search for an executable in path. </p> 457<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 458 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 459 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> 460 <a class="link" href="../boost/process/search_path.html" title="Function search_path"><span class="identifier">search_path</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&</span><span class="special">,</span> 461 <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">></span> <span class="special">=</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_process</span><span class="special">::</span><span class="identifier">path</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span> 462 <span class="special">}</span> 463<span class="special">}</span></pre> 464</div> 465<div class="section"> 466<div class="titlepage"><div><div><h3 class="title"> 467<a name="header.boost.process.shell_hpp"></a>Header <<a href="../../../../../boost/process/shell.hpp" target="_top">boost/process/shell.hpp</a>></h3></div></div></div> 468<p>Header which provides the shell property. This provides the property to launch a process through the system shell. It also allows the user to obtain the shell-path via shell(). 469</p> 470<pre class="programlisting"> 471<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 472 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 473 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/shell.html" title="Global shell">shell</a><span class="special">;</span> 474 <span class="special">}</span> 475<span class="special">}</span> 476</pre> 477<p> 478 </p> 479</div> 480<div class="section"> 481<div class="titlepage"><div><div><h3 class="title"> 482<a name="header.boost.process.spawn_hpp"></a>Header <<a href="../../../../../boost/process/spawn.hpp" target="_top">boost/process/spawn.hpp</a>></h3></div></div></div> 483<p>Defines the spawn function. </p> 484<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 485 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 486 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="special">...</span> Args<span class="special">></span> <span class="keyword">void</span> <a class="link" href="../boost/process/spawn.html" title="Function template spawn"><span class="identifier">spawn</span></a><span class="special">(</span><span class="identifier">Args</span> <span class="special">&&</span><span class="special">...</span><span class="special">)</span><span class="special">;</span> 487 <span class="special">}</span> 488<span class="special">}</span></pre> 489</div> 490<div class="section"> 491<div class="titlepage"><div><div><h3 class="title"> 492<a name="header.boost.process.start_dir_hpp"></a>Header <<a href="../../../../../boost/process/start_dir.hpp" target="_top">boost/process/start_dir.hpp</a>></h3></div></div></div> 493<p>Header which provides the start_dir property, which allows to set the directory the process shall be started in. 494</p> 495<pre class="programlisting"> 496<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 497 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 498 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/start_dir.html" title="Global start_dir">start_dir</a><span class="special">;</span> 499 <span class="special">}</span> 500<span class="special">}</span> 501</pre> 502<p> 503 </p> 504</div> 505<div class="section"> 506<div class="titlepage"><div><div><h3 class="title"> 507<a name="header.boost.process.system_hpp"></a>Header <<a href="../../../../../boost/process/system.hpp" target="_top">boost/process/system.hpp</a>></h3></div></div></div> 508<p>Defines a system function. </p> 509<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 510 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 511 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="special">...</span> Args<span class="special">></span> <span class="keyword">int</span> <a class="link" href="../boost/process/system.html" title="Function template system"><span class="identifier">system</span></a><span class="special">(</span><span class="identifier">Args</span> <span class="special">&&</span><span class="special">...</span><span class="special">)</span><span class="special">;</span> 512 <span class="special">}</span> 513<span class="special">}</span></pre> 514</div> 515<div class="section"> 516<div class="titlepage"><div><div><h3 class="title"> 517<a name="header.boost.process.windows_hpp"></a>Header <<a href="../../../../../boost/process/windows.hpp" target="_top">boost/process/windows.hpp</a>></h3></div></div></div> 518<p>Header which provides the windows extensions.</p> 519<p> 520</p> 521<pre class="programlisting"> 522<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> 523 <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span> 524 <span class="keyword">namespace</span> <span class="identifier">windows</span> <span class="special">{</span> 525 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/windows/hide.html" title="Global hide">hide</a><span class="special">;</span> 526 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/windows/maximized.html" title="Global maximized">maximized</a><span class="special">;</span> 527 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/windows/minimized.html" title="Global minimized">minimized</a><span class="special">;</span> 528 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/windows/minimized_not_active.html" title="Global minimized_not_active">minimized_not_active</a><span class="special">;</span> 529 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/windows/not_active.html" title="Global not_active">not_active</a><span class="special">;</span> 530 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/windows/show.html" title="Global show">show</a><span class="special">;</span> 531 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/windows/show_normal.html" title="Global show_normal">show_normal</a><span class="special">;</span> 532 <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="../boost/process/windows/create_no_window.html" title="Global create_no_window">create_no_window</a><span class="special">;</span> 533 <span class="special">}</span> 534 <span class="special">}</span> 535<span class="special">}</span> 536</pre> 537<p> 538 </p> 539<div class="warning"><table border="0" summary="Warning"> 540<tr> 541<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../doc/src/images/warning.png"></td> 542<th align="left">Warning</th> 543</tr> 544<tr><td align="left" valign="top"><p>Only available on windows. See the parameter documentation of <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms633548.aspx" target="_top">ShowWindow</a> for more details. </p></td></tr> 545</table></div> 546<p> 547</p> 548</div> 549</div> 550<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 551<td align="left"></td> 552<td align="right"><div class="copyright-footer">Copyright © 2006-2012 Julio M. Merino Vidal, Ilya Sokolov, 553 Felipe Tanus, Jeff Flinn, Boris Schaeling<br>Copyright © 2016 Klemens D. Morgenstern<p> 554 Distributed under the Boost Software License, Version 1.0. (See accompanying 555 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 556 </p> 557</div></td> 558</tr></table> 559<hr> 560<div class="spirit-nav"> 561<a accesskey="p" href="../boost_process/faq.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../process.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost/process/args.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> 562</div> 563</body> 564</html> 565