summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-02-28 11:58:41 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-02-28 11:58:41 +0000
commitf8658e86c8237cebb1d0ce41f28e2715b983a532 (patch)
treebd2c11e1a0eaaa4bd496230cfbfe5e9f6e4df141
parentcf87e55c96d076c0d05e59cde40548a483fdebb9 (diff)
downloads6-rc-f8658e86c8237cebb1d0ce41f28e2715b983a532.tar.xz
Add s6-rc-fdholder-filler doc
-rw-r--r--doc/index.html1
-rw-r--r--doc/s6-rc-fdholder-filler.html95
2 files changed, 96 insertions, 0 deletions
diff --git a/doc/index.html b/doc/index.html
index 06e92bf..897a777 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -114,6 +114,7 @@ the previous versions of s6-rc and the current one. </li>
<ul>
<li> <a href="s6-rc-dryrun.html">The <tt>s6-rc-dryrun</tt> internal program</a> </li>
<li> <a href="s6-rc-oneshot-run.html">The <tt>s6-rc-oneshot-run</tt> internal program</a> </li>
+ <li> <a href="s6-rc-fdholder-filler.html">The <tt>s6-rc-fdholder-filler</tt> internal program</a> </li>
</ul>
<h2> Related resources </h2>
diff --git a/doc/s6-rc-fdholder-filler.html b/doc/s6-rc-fdholder-filler.html
new file mode 100644
index 0000000..83132fd
--- /dev/null
+++ b/doc/s6-rc-fdholder-filler.html
@@ -0,0 +1,95 @@
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>s6-rc: the s6-rc-fdholder-filler program</title>
+ <meta name="Description" content="s6-rc: the s6-rc-fdholder-filler program" />
+ <meta name="Keywords" content="s6-rc dry run s6-rc-fdholder-filler internal s6-rc fdholder s6rc-fdholder pipe" />
+ <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
+ </head>
+<body>
+
+<p>
+<a href="index.html">s6-rc</a><br />
+<a href="http://skarnet.org/software/">Software</a><br />
+<a href="http://skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The s6-rc-fdholder-filler internal program </h1>
+
+<p>
+ s6-rc-fdholder-filler creates anonymous pipes and stores them into a
+<a href="http://skarnet.org/software/s6/s6-fdholderd.html">s6-fdholderd</a>
+"fd-holding" daemon.
+</p>
+
+<p>
+ s6-rc-fdholder-filler is not meant to be used directly; it is used
+in internal scripts created by
+<a href="s6-rc-compile.html">s6-rc-compile</a>, which are invoked during an
+<a href="s6-rc.html">s6-rc</a> execution.
+</p>
+
+<h2> Interface </h2>
+
+<pre>
+ s6-rc-fdholder-filler [ -1 ] [ -t <em>timeout</em> ] <em>longrunnames...</em>
+</pre>
+
+<ul>
+ <li> s6-rc-fdholder-filler expects file descriptor 6 to be open and
+connected to the
+<a href="http://skarnet.org/software/s6/s6-fdholderd.html">s6-fdholderd</a>
+daemon instance managed by s6-rc as the internal <em>s6rc-fdholder</em> service. </li>
+ <li> For every argument <em>longrun</em> in <em>longrunnames...</em>, it
+creates an anonymous pipe, and stores both ends of that pipe into the
+<a href="http://skarnet.org/software/s6/s6-fdholderd.html">s6-fdholderd</a>
+instance, with the <tt>pipe:s6-rc-r-<em>longrun</em></tt> (for the reading
+end) and <tt>pipe:s6-rc-w-<em>longrun</em></tt> (for the writing end)
+identifiers, and an infinite timeout. </li>
+ <li> It then exits 0. </li>
+</ul>
+
+<h2> Options </h2>
+
+<ul>
+ <li> <tt>-1</tt>&nbsp;: write a newline to stdout before exiting after
+successful operation. This is used as a notification mechanism. </li>
+ <li> <tt>-t&nbsp;<em>timeout</em></tt>&nbsp;: if the operation cannot be
+achieved in <em>timeout</em> milliseconds, abort and report failure. By
+default, <em>timeout</em> is 0, meaning infinite. </li>
+</ul>
+
+<h2> Exit codes </h2>
+
+<ul>
+ <li> 0: success </li>
+ <li> 100: wrong usage </li>
+ <li> 111: system call failed </li>
+</ul>
+
+<h2> Notes </h2>
+
+<ul>
+ <li> s6-rc-fdholder-filler is never meant to be used manually; this page
+should only be used to understand s6-rc internals. </li>
+ <li> s6-rc-fdholder-filler is used in the <tt>s6rc-fdholder</tt> internal
+service's run script, right after the
+<a href="http://skarnet.org/software/s6/s6-fdholderd.html">s6-fdholderd</a>
+daemon is started; its arguments are the names of all the consumer longrun
+services declared in the service database. </li>
+ <li> The point is to create all the pipes for the longrun pipelines in
+advance, every time the <tt>s6rc-fdholder</tt> service is started, and
+make them available in the fd holder. This way, pipelined services
+can simply retrieve their stdin (for consumers) or stdout (for producers)
+from the fd holder, at any time: even if a pipeline service dies and is
+restarted, the pipe will remain valid. </li>
+ <li> If the fd holder itself dies, it will be refilled with a new set
+of pipes as soon as it is restarted. Pipelined services will not be
+impacted until one of them restarts; then all the pipeline will
+restart. </li>
+</ul>
+
+</body>
+</html>