autodoc.git
/
traditional_manual
/
chapter_9.html
version
»
Context lines:
10
20
40
80
file
none
3
autodoc.git/traditional_manual/chapter_9.html:4130:
both before and after the function returns.</p> <p> For <code>callback</code> to be called, the backend must be active (ie <code>main()</code> must have returned <code class='expr'>-1</code>, or <code>Pike.DefaultBackend</code> get called in some other way).</p> <p> In some cases, the backend must also be active for any sending to be performed at all.</p> <p> In Pike 7.4.496, Pike 7.6.120 and Pike 7.7 and later the backend associated with <code>to</code> will be used rather than the default backend. Note that you usually will want <code>from</code> to have the same backend as <code>to</code>.</p> </dd>
+
<dt class='head--doc'>Note</dt>
+
<dd class='body--doc'><p>The low-level sending may be performed with blocking I/O calls, and
+
thus trigger the process being killed with <tt>SIGPIPE</tt> when the
+
peer closes the other end. Add a call to <code>signal()</code> to avoid this.</p>
+
</dd>
<dt class='head--doc'>Bugs</dt> <dd class='body--doc'><p>FIXME: Support for timeouts?</p> </dd> <dt class='head--doc'>See also</dt> <dd class='body--doc'><p><code>Stdio.File->set_nonblocking()</code></p> </dd></dl> <hr /> <dl class='group--doc'>
autodoc.git/traditional_manual/chapter_9.html:7732:
<p> Setting <code>offset</code> to <code class='expr'>-1</code> means send from the current position in <code>from</code>.</p> <p> Setting <code>len</code> to <code class='expr'>-1</code> means send until <code>from</code>'s end of file is reached.</p> </dd> <dt class='head--doc'>Note</dt> <dd class='body--doc'><p>Don't use this class directly! Use <code>Stdio.sendfile()</code> instead.</p> <p> In Pike 7.7 and later the <code>callback</code> function will be called from the backend associated with <code>to</code>.</p> </dd>
+
<dt class='head--doc'>Note</dt>
+
<dd class='body--doc'><p>May use blocking I/O and thus trigger process being killed
+
with <tt>SIGPIPE</tt> when the other end closes the connection.
+
Add a call to <code>signal()</code> to avoid this.</p>
+
</dd>
<dt class='head--doc'>See also</dt> <dd class='body--doc'><p><code>Stdio.sendfile()</code></p> </dd></dl> </dd></dl></dd></dl></dd></dl></body></html>