/usr/share/doc/libucommon-dev/a00149.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | <!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"/>
<title>UCommon: ucc::shell::pipeio Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</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 class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00142.html">shell</a>::<a class="el" href="a00149.html">pipeio</a>
</div>
</div>
<div class="contents">
<h1>ucc::shell::pipeio Class Reference</h1><!-- doxytag: class="ucc::shell::pipeio" -->
<p>A class to control a process that is piped.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00204_source.html">shell.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for ucc::shell::pipeio:</div>
<div class="dynsection">
<div class="center"><img src="a00545.png" border="0" usemap="#ucc_1_1shell_1_1pipeio_inherit__map" alt="Inheritance graph"/></div>
<map name="ucc_1_1shell_1_1pipeio_inherit__map" id="ucc_1_1shell_1_1pipeio_inherit__map">
<area shape="rect" id="node3" href="a00146.html" title="Process pipe with I/O buffering." alt="" coords="8,83,128,112"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#a1defcaec4f8b27791f4b896c5ebbb302">cancel</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Signal termination and wait for child process to exit. <a href="#a1defcaec4f8b27791f4b896c5ebbb302"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aff79c1c5ef588a893642e959efb2c0c0"></a><!-- doxytag: member="ucc::shell::pipeio::pipeio" ref="aff79c1c5ef588a893642e959efb2c0c0" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#aff79c1c5ef588a893642e959efb2c0c0">pipeio</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an empty initialized pipe for use. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#a2ec446558c806a78c866fc4ff9895e59">read</a> (void *address, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Read input from child process. <a href="#a2ec446558c806a78c866fc4ff9895e59"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#a6dae8fce5343eea6912277cbfca83d17">spawn</a> (const char *path, char **argv, <a class="el" href="a00142.html#af7525d05d6f9ea8f71492a42de9c528c">pmode_t</a> mode, size_t size=512, char **env=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Spawn and attach child process I/O through piping. <a href="#a6dae8fce5343eea6912277cbfca83d17"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#a575f8a503b4ea8818a56683c43f6a856">wait</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for child process to exit. <a href="#a575f8a503b4ea8818a56683c43f6a856"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#a95b595673cd099a3a4c2bea11cd3312f">write</a> (const void *address, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write to the child process. <a href="#a95b595673cd099a3a4c2bea11cd3312f"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7378101f3f01c0a737d33398d3389781"></a><!-- doxytag: member="ucc::shell::pipeio::input" ref="a7378101f3f01c0a737d33398d3389781" args="" -->
fd_t </td><td class="memItemRight" valign="bottom"><b>input</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acec8417410b408726fba5052fba57258"></a><!-- doxytag: member="ucc::shell::pipeio::output" ref="acec8417410b408726fba5052fba57258" args="" -->
fd_t </td><td class="memItemRight" valign="bottom"><b>output</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc68a1e21b8c9bb17b5e2f7aa32086da"></a><!-- doxytag: member="ucc::shell::pipeio::perror" ref="adc68a1e21b8c9bb17b5e2f7aa32086da" args="" -->
int </td><td class="memItemRight" valign="bottom"><b>perror</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a906ab658d77d00002b5769e8101c6938"></a><!-- doxytag: member="ucc::shell::pipeio::pid" ref="a906ab658d77d00002b5769e8101c6938" args="" -->
<a class="el" href="a00142.html#a398f2242af2b40f5f95d2c3b7c46c631">pid_t</a> </td><td class="memItemRight" valign="bottom"><b>pid</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8416099c146bbed9a0628e503920d36d"></a><!-- doxytag: member="ucc::shell::pipeio::presult" ref="a8416099c146bbed9a0628e503920d36d" args="" -->
int </td><td class="memItemRight" valign="bottom"><b>presult</b></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49e70af2c7a3eaa8894f0535560fdbc4"></a><!-- doxytag: member="ucc::shell::pipeio::shell" ref="a49e70af2c7a3eaa8894f0535560fdbc4" args="" -->
class </td><td class="memItemRight" valign="bottom"><b>shell</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A class to control a process that is piped. </p>
<p>This holds the active file descriptors for the pipe as well as the process id. Basic I/O methods are provided to send and receive data with the piped child process. This may be used by itself with various shell methods as a pipe_t, or to construct piped objects such as iobuf. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl>
<p>Definition at line <a class="el" href="a00204_source.html#l00111">111</a> of file <a class="el" href="a00204_source.html">shell.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a1defcaec4f8b27791f4b896c5ebbb302"></a><!-- doxytag: member="ucc::shell::pipeio::cancel" ref="a1defcaec4f8b27791f4b896c5ebbb302" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::shell::pipeio::cancel </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Signal termination and wait for child process to exit. </p>
<p>When it does all piping is closed. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>process exit code or -1 if error. </dd></dl>
<p>Reimplemented in <a class="el" href="a00146.html#a721f03b72c2202b0d68ffd08b892a572">ucc::shell::iobuf</a>.</p>
</div>
</div>
<a class="anchor" id="a2ec446558c806a78c866fc4ff9895e59"></a><!-- doxytag: member="ucc::shell::pipeio::read" ref="a2ec446558c806a78c866fc4ff9895e59" args="(void *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::shell::pipeio::read </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read input from child process. </p>
<p>If there is an error, the result is 0 and perror holds the error code. If an error already happened no further data will be read. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>to store input. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of input to read. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes actually read. </dd></dl>
</div>
</div>
<a class="anchor" id="a6dae8fce5343eea6912277cbfca83d17"></a><!-- doxytag: member="ucc::shell::pipeio::spawn" ref="a6dae8fce5343eea6912277cbfca83d17" args="(const char *path, char **argv, pmode_t mode, size_t size=512, char **env=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::shell::pipeio::spawn </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"> <em>argv</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00142.html#af7525d05d6f9ea8f71492a42de9c528c">pmode_t</a> </td>
<td class="paramname"> <em>mode</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em> = <code>512</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"> <em>env</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Spawn and attach child process I/O through piping. </p>
<p>Stderr is left attached to the console. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>path</em> </td><td>of program to execute. If simple file, $PATH is used. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>argv</em> </td><td>to pass to child process. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>mode</em> </td><td>of pipe operation; rdonly, wronly, or rdwr. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of atomic pipe buffer if setable. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>that may optionally be given to the child process. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a575f8a503b4ea8818a56683c43f6a856"></a><!-- doxytag: member="ucc::shell::pipeio::wait" ref="a575f8a503b4ea8818a56683c43f6a856" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::shell::pipeio::wait </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Wait for child process to exit. </p>
<p>When it does, close all piping. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>process exit code or -1 if error. </dd></dl>
</div>
</div>
<a class="anchor" id="a95b595673cd099a3a4c2bea11cd3312f"></a><!-- doxytag: member="ucc::shell::pipeio::write" ref="a95b595673cd099a3a4c2bea11cd3312f" args="(const void *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t ucc::shell::pipeio::write </td>
<td>(</td>
<td class="paramtype">const void * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Write to the child process. </p>
<p>If there is an error, the result is 0 and perror holds the error code. If an error already happened no further data will be written. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>to write data from. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of data to write. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes actually written. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00204_source.html">shell.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:47 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|