diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-01-26 22:26:57 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-01-26 22:26:57 +0000 |
commit | 8bffa1c19fd05f4f04dad4b5b98f85b94f23113c (patch) | |
tree | f4e25c3cdb7118db02a06c85b7862107a2074ba4 /doc/s6-fdholder-store.html | |
parent | 49cb17940e403431566dc7b5a312624f14eb25d0 (diff) | |
download | s6-8bffa1c19fd05f4f04dad4b5b98f85b94f23113c.tar.gz s6-8bffa1c19fd05f4f04dad4b5b98f85b94f23113c.tar.xz s6-8bffa1c19fd05f4f04dad4b5b98f85b94f23113c.zip |
- added s6-fdholder-delete(c)
- small s6-fdholder-* fixes - s6-fdholder documentation (in review) - s6_svstatus_* bugfix (thanks Olivier Brunel)
Diffstat (limited to 'doc/s6-fdholder-store.html')
-rw-r--r-- | doc/s6-fdholder-store.html | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/doc/s6-fdholder-store.html b/doc/s6-fdholder-store.html new file mode 100644 index 0000000..c67927d --- /dev/null +++ b/doc/s6-fdholder-store.html @@ -0,0 +1,80 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6: the s6-fdholder-store program</title> + <meta name="Description" content="s6: the s6-fdholder-store program" /> + <meta name="Keywords" content="s6 s6-fdholder fd-holding fd-holder fd storage unix socket activation" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-fdholder-store</tt> program </h1> + +<p> +<tt>s6-fdholder-store</tt> connects to a +<a href="s6-fdholderd.html">fd-holding daemon</a> listening on a +Unix domain socket, and gives it a copy of one of its open file +descriptors for the daemon to hold. +</p> + +<h2> Interface </h2> + +<pre> + s6-fdholder-store [ -d <em>fd</em> ] [ -T fdtimeout ] [ -t <em>timeout</em> ] <em>path</em> <em>id</em> +</pre> + +<ul> + <li> s6-fdholder-store executes into <tt><a href="s6-ipcclient.html">s6-ipcclient</a> <em>path</em> +<a href="s6-fdholder-storec.html">s6-fdholder-storec</a> <em>id</em></tt>. It does nothing else: it is just a +convenience program. The <a href="s6-ipcclient.html">s6-ipcclient</a> program connects +to a Unix socket at <em>path</em>, and the +<a href="s6-fdholder-storec.html">s6-fdholder-storec</a> program transmits the desired +file descriptor over the socket. </li> + <li> It should be used to connect to a +<a href="s6-fdholderd.html">s6-fdholderd</a> daemon, which will store the +file descriptor given by the user. </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-d <em>fd</em></tt> : store descriptor number <em>fd</em>. +By default, <em>fd</em> is 0 (i.e. the program's stdin will be stored). +s6-fdholder-store replaces its stdin with <em>fd</em> before executing into +<tt>s6-ipcclient <a href="s6-fdholder-storec.html">s6-fdholder-storec</a></tt>. </li> + <li> <tt>-T <em>fdtimeout</em></tt> : the descriptor is stored with +an expiration time of <em>fdtimeout</em> milliseconds, which means the +<a href="s6-fdholderd.html">s6-fdholderd</a> daemon will close and get rid of +the descriptor after that time. By default, <em>fdtimeout</em> is 0, which +means infinite - no expiration time. </li> +<li> <tt>-t <em>timeout</em></tt> : if the operation cannot be +processed in <em>timeout</em> milliseconds, then fail with an error message. +Communications with the server should be near-instant, so this option is +only here to protect users against programming errors (connecting to the +wrong socket, for instance). </li> +</ul> + +<h2> Usage example </h2> + +<pre> + <a href="s6-ipcserver-socketbinder.html">s6-ipcserver-socketbinder</a> /tmp/mysocket s6-fdholder-store /service/fdholderd/s MYSOCKET +</pre> + +<p> + will open a Unix domain socket, bind it to <tt>/tmp/mysocket</tt> and +listen to incoming connections, then give it to a +<a href="s6-fdholderd.html">s6-fdholderd</a> instance listening on +<tt>/service/fdholderd/s</tt>, with no expiration date, with the +"MYSOCKET" identifier. Another program will be able to retrieve the +socket later, using <a href="s6-fdholder-retrieve.html">s6-fdholder-retrieve</a>. +</p> + +</body> +</html> |