This file is indexed.

/usr/share/doc/racket/inside/Subprocesses.html is in racket-doc 6.7-3.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>19&nbsp;Subprocesses</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Inside:<span class="mywbr"> &nbsp;</span> Racket C API</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="overview.html" class="tocviewlink" data-pltdoc="x">Overview</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="embedding.html" class="tocviewlink" data-pltdoc="x">Embedding into a Program</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="Writing_Racket_Extensions.html" class="tocviewlink" data-pltdoc="x">Writing Racket Extensions</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="im_values_types.html" class="tocviewlink" data-pltdoc="x">Values and Types</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="im_memoryalloc.html" class="tocviewlink" data-pltdoc="x">Memory Allocation</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="im_env.html" class="tocviewlink" data-pltdoc="x">Namespaces and Modules</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="Procedures.html" class="tocviewlink" data-pltdoc="x">Procedures</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="Evaluation.html" class="tocviewlink" data-pltdoc="x">Evaluation</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="exceptions.html" class="tocviewlink" data-pltdoc="x">Exceptions and Escape Continuations</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="threads.html" class="tocviewlink" data-pltdoc="x">Threads</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="config.html" class="tocviewlink" data-pltdoc="x">Parameterizations</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="contmarks.html" class="tocviewlink" data-pltdoc="x">Continuation Marks</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="im_encodings.html" class="tocviewlink" data-pltdoc="x">String Encodings</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="Bignums__Rationals__and_Complex_Numbers.html" class="tocviewlink" data-pltdoc="x">Bignums, Rationals, and Complex Numbers</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="Ports_and_the_Filesystem.html" class="tocviewlink" data-pltdoc="x">Ports and the Filesystem</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="Structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Security Guards</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="Custodians.html" class="tocviewlink" data-pltdoc="x">Custodians</a></td></tr><tr><td align="right">19&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Subprocesses</a></td></tr><tr><td align="right">20&nbsp;</td><td><a href="Miscellaneous_Utilities.html" class="tocviewlink" data-pltdoc="x">Miscellaneous Utilities</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Custodians.html" title="backward to &quot;18 Custodians&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Inside: Racket C API&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="Miscellaneous_Utilities.html" title="forward to &quot;20 Miscellaneous Utilities&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3 x-source-module="(lib &quot;scribblings/inside/inside.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;Subprocesses&quot;">19<tt>&nbsp;</tt><a name="(part._.Subprocesses)"></a>Subprocesses</h3><p>On Unix and Mac OS X, subprocess handling involves
<a name="(idx._(gentag._583._(lib._scribblings/inside/inside..scrbl)))"></a><span class="stt">fork</span>, <a name="(idx._(gentag._584._(lib._scribblings/inside/inside..scrbl)))"></a><span class="stt">waitpid</span>, and
<a name="(idx._(gentag._585._(lib._scribblings/inside/inside..scrbl)))"></a><span class="stt">SIGCHLD</span>, which creates a variety of issues within an
embedding application. On Windows, subprocess handling is more
straightforward, since no <span class="stt">fork</span> is required, and since Windows
provides an abstraction that is a close fit to Racket&rsquo;s subprocess
values.</p><p>After Racket creates a subprocess via <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=subprocess.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._subprocess%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">subprocess</a></span> (or
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=subprocess.html%23%2528def._%2528%2528lib._racket%252Fsystem..rkt%2529._system%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">system</a></span>, <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=subprocess.html%23%2528def._%2528%2528lib._racket%252Fsystem..rkt%2529._process%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">process</a></span>, etc.), it periodically polls the
process status using <span class="stt">waitpid</span>. If the process is created as its
own group, then the call to <span class="stt">waitpid</span> uses the created
subprocess&rsquo;s process ID; for all other subprocesses, polling uses a
single call to <span class="stt">waitpid</span> with the first argument as <span class="stt">0</span>. Using
<span class="stt">0</span>, in particular, can interfere with other libraries in an
embedding context, so Racket refrains from calling <span class="stt">waitpid</span> if no
subprocesses are pending.</p><p>Racket may or may not rely on a <span class="stt">SIGCHLD</span> handler, and it may or
may not block <span class="stt">SIGCHLD</span>. Currently, when Racket is compiled to
support <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=places.html%23%2528tech._place%2529&amp;version=6.7" class="techoutside Sq" data-pltdoc="x"><span class="techinside">place</span></a>s, Racket blocks <span class="stt">SIGCHLD</span> on start up with
the expectation that all created threads have <span class="stt">SIGCHLD</span> blocked.
When Racket is not compiled to support <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=places.html%23%2528tech._place%2529&amp;version=6.7" class="techoutside Sq" data-pltdoc="x"><span class="techinside">place</span></a>s, then a
<span class="stt">SIGCHLD</span> handler is installed.</p><p>Using <span class="stt">fork</span> in an application that embeds Racket is problematic
for several reasons: Racket may install a <span class="stt">SIGALRM</span> handler and
schedule alarms to implement context switches, it may have file
descriptors open that should be closed in a child process, and it may
have changed the disposition of signals such as
<span class="stt">SIGCHLD</span>. Consequently, embedding Racket in a process that
<span class="stt">fork</span>s is technically not supported; in the future, Racket may
provide better support for such applications.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Custodians.html" title="backward to &quot;18 Custodians&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Inside: Racket C API&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="Miscellaneous_Utilities.html" title="forward to &quot;20 Miscellaneous Utilities&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>