| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.5"/> |
| <title>Apache Mesos: process::Subprocess::IO Class Reference</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">Apache Mesos |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.5 --> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.html"><span>Main Page</span></a></li> |
| <li><a href="pages.html"><span>Related Pages</span></a></li> |
| <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
| <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
| <li><a href="files.html"><span>Files</span></a></li> |
| <li><a href="examples.html"><span>Examples</span></a></li> |
| </ul> |
| </div> |
| <div id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="annotated.html"><span>Class List</span></a></li> |
| <li><a href="classes.html"><span>Class Index</span></a></li> |
| <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
| <li><a href="functions.html"><span>Class Members</span></a></li> |
| </ul> |
| </div> |
| <div id="nav-path" class="navpath"> |
| <ul> |
| <li class="navelem"><a class="el" href="namespaceprocess.html">process</a></li><li class="navelem"><a class="el" href="classprocess_1_1Subprocess.html">Subprocess</a></li><li class="navelem"><a class="el" href="classprocess_1_1Subprocess_1_1IO.html">IO</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="summary"> |
| <a href="#nested-classes">Classes</a> | |
| <a href="#pub-types">Public Types</a> | |
| <a href="#friends">Friends</a> | |
| <a href="classprocess_1_1Subprocess_1_1IO-members.html">List of all members</a> </div> |
| <div class="headertitle"> |
| <div class="title">process::Subprocess::IO Class Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>Describes how the I/O is redirected for stdin/stdout/stderr. |
| <a href="classprocess_1_1Subprocess_1_1IO.html#details">More...</a></p> |
| |
| <p><code>#include <<a class="el" href="subprocess__base_8hpp_source.html">subprocess_base.hpp</a>></code></p> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> |
| Classes</h2></td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structprocess_1_1Subprocess_1_1IO_1_1InputFileDescriptors.html">InputFileDescriptors</a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">For input file descriptors a child reads from the <code>read</code> file descriptor and a parent may write to the <code>write</code> file descriptor if one is present. <a href="structprocess_1_1Subprocess_1_1IO_1_1InputFileDescriptors.html#details">More...</a><br/></td></tr> |
| <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structprocess_1_1Subprocess_1_1IO_1_1OutputFileDescriptors.html">OutputFileDescriptors</a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">For output file descriptors a child writes to the <code>write</code> file descriptor and a parent may read from the <code>read</code> file descriptor if one is present. <a href="structprocess_1_1Subprocess_1_1IO_1_1OutputFileDescriptors.html#details">More...</a><br/></td></tr> |
| <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> |
| Public Types</h2></td></tr> |
| <tr class="memitem:adb9433454d727de27b2440f729d19990"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1Subprocess_1_1IO.html#adb9433454d727de27b2440f729d19990">FDType</a> { <a class="el" href="classprocess_1_1Subprocess_1_1IO.html#adb9433454d727de27b2440f729d19990af648d44b624da021da40a80190291380">DUPLICATED</a>, |
| <a class="el" href="classprocess_1_1Subprocess_1_1IO.html#adb9433454d727de27b2440f729d19990ad3f73761156a6e75873cf903a0d62994">OWNED</a> |
| }</td></tr> |
| <tr class="memdesc:adb9433454d727de27b2440f729d19990"><td class="mdescLeft"> </td><td class="mdescRight">Describes the lifecycle of a file descriptor passed into a subprocess via the <code><a class="el" href="classprocess_1_1Subprocess.html#aaa6e1b76ef54ed6db34d595811122ce0">Subprocess::FD</a></code> helper. <a href="classprocess_1_1Subprocess_1_1IO.html#adb9433454d727de27b2440f729d19990">More...</a><br/></td></tr> |
| <tr class="separator:adb9433454d727de27b2440f729d19990"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> |
| Friends</h2></td></tr> |
| <tr class="memitem:a3d12fd22e5deb76d3529ce4e6d9179dc"><td class="memItemLeft" align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1Subprocess_1_1IO.html#a3d12fd22e5deb76d3529ce4e6d9179dc">Subprocess</a></td></tr> |
| <tr class="separator:a3d12fd22e5deb76d3529ce4e6d9179dc"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ac8482b6f6f0eb22c6137b9c72769d5ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classTry.html">Try</a>< <a class="el" href="classprocess_1_1Subprocess.html">Subprocess</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1Subprocess_1_1IO.html#ac8482b6f6f0eb22c6137b9c72769d5ea">subprocess</a> (const std::string &path, std::vector< std::string > argv, const <a class="el" href="classprocess_1_1Subprocess_1_1IO.html">Subprocess::IO</a> &<a class="el" href="classprocess_1_1Subprocess.html#a60535054108d572796c25011c2aa379d">in</a>, const <a class="el" href="classprocess_1_1Subprocess_1_1IO.html">Subprocess::IO</a> &<a class="el" href="classprocess_1_1Subprocess.html#a1c1a81931671b15c0c4b310bc49dea56">out</a>, const <a class="el" href="classprocess_1_1Subprocess_1_1IO.html">Subprocess::IO</a> &<a class="el" href="classprocess_1_1Subprocess.html#a98180558f1427a64a03cf3f656310bc4">err</a>, const <a class="el" href="classflags_1_1FlagsBase.html">flags::FlagsBase</a> *flags, const <a class="el" href="classOption.html">Option</a>< std::map< std::string, std::string >> &environment, const <a class="el" href="classOption.html">Option</a>< lambda::function< <a class="el" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a>(const lambda::function< int()> &)>> &clone, const std::vector< <a class="el" href="structprocess_1_1Subprocess_1_1ParentHook.html">Subprocess::ParentHook</a> > &parent_hooks, const std::vector< <a class="el" href="classprocess_1_1Subprocess_1_1ChildHook.html">Subprocess::ChildHook</a> > &child_hooks)</td></tr> |
| <tr class="separator:ac8482b6f6f0eb22c6137b9c72769d5ea"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p>Describes how the I/O is redirected for stdin/stdout/stderr. </p> |
| <p>One of the following three modes are supported:</p> |
| <ol type="1"> |
| <li>PIPE: Redirect to a pipe. The pipe will be created when launching a subprocess and the user can read/write the parent side of the pipe using <code><a class="el" href="classprocess_1_1Subprocess.html#a60535054108d572796c25011c2aa379d">Subprocess::in</a>/out/err</code>.</li> |
| <li>PATH: Redirect to a file. For stdout/stderr, the file will be created if it does not exist. If the file exists, it will be appended.</li> |
| <li>FD: Redirect to an open file descriptor. </li> |
| </ol> |
| </div><h2 class="groupheader">Member Enumeration Documentation</h2> |
| <a class="anchor" id="adb9433454d727de27b2440f729d19990"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">enum <a class="el" href="classprocess_1_1Subprocess_1_1IO.html#adb9433454d727de27b2440f729d19990">process::Subprocess::IO::FDType</a></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Describes the lifecycle of a file descriptor passed into a subprocess via the <code><a class="el" href="classprocess_1_1Subprocess.html#aaa6e1b76ef54ed6db34d595811122ce0">Subprocess::FD</a></code> helper. </p> |
| <table class="fieldtable"> |
| <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="adb9433454d727de27b2440f729d19990af648d44b624da021da40a80190291380"></a>DUPLICATED</em> </td><td class="fielddoc"> |
| <p>The file descriptor is duplicated before being passed to the subprocess. </p> |
| <p>The original file descriptor remains open. </p> |
| </td></tr> |
| <tr><td class="fieldname"><em><a class="anchor" id="adb9433454d727de27b2440f729d19990ad3f73761156a6e75873cf903a0d62994"></a>OWNED</em> </td><td class="fielddoc"> |
| <p>The file descriptor is not duplicated before being passed to the subprocess. </p> |
| <p>Upon spawning the subprocess, the original file descriptor is closed in the parent and remains open in the child. </p> |
| </td></tr> |
| </table> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Friends And Related Function Documentation</h2> |
| <a class="anchor" id="a3d12fd22e5deb76d3529ce4e6d9179dc"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">friend class <a class="el" href="classprocess_1_1Subprocess.html">Subprocess</a></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">friend</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ac8482b6f6f0eb22c6137b9c72769d5ea"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classTry.html">Try</a><<a class="el" href="classprocess_1_1Subprocess.html">Subprocess</a>> subprocess </td> |
| <td>(</td> |
| <td class="paramtype">const std::string & </td> |
| <td class="paramname"><em>path</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">std::vector< std::string > </td> |
| <td class="paramname"><em>argv</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classprocess_1_1Subprocess_1_1IO.html">Subprocess::IO</a> & </td> |
| <td class="paramname"><em>in</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classprocess_1_1Subprocess_1_1IO.html">Subprocess::IO</a> & </td> |
| <td class="paramname"><em>out</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classprocess_1_1Subprocess_1_1IO.html">Subprocess::IO</a> & </td> |
| <td class="paramname"><em>err</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classflags_1_1FlagsBase.html">flags::FlagsBase</a> * </td> |
| <td class="paramname"><em>flags</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classOption.html">Option</a>< std::map< std::string, std::string >> & </td> |
| <td class="paramname"><em>environment</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classOption.html">Option</a>< lambda::function< <a class="el" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a>(const lambda::function< int()> &)>> & </td> |
| <td class="paramname"><em>clone</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const std::vector< <a class="el" href="structprocess_1_1Subprocess_1_1ParentHook.html">Subprocess::ParentHook</a> > & </td> |
| <td class="paramname"><em>parent_hooks</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const std::vector< <a class="el" href="classprocess_1_1Subprocess_1_1ChildHook.html">Subprocess::ChildHook</a> > & </td> |
| <td class="paramname"><em>child_hooks</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">friend</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following file:<ul> |
| <li>3rdparty/libprocess/include/process/<a class="el" href="subprocess__base_8hpp_source.html">subprocess_base.hpp</a></li> |
| </ul> |
| </div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.5 |
| </small></address> |
| </body> |
| </html> |