diff options
Diffstat (limited to 'doc/s6-fdholder-getdump.html')
-rw-r--r-- | doc/s6-fdholder-getdump.html | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/doc/s6-fdholder-getdump.html b/doc/s6-fdholder-getdump.html new file mode 100644 index 0000000..a339b71 --- /dev/null +++ b/doc/s6-fdholder-getdump.html @@ -0,0 +1,92 @@ +<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-getdump program</title> + <meta name="Description" content="s6: the s6-fdholder-getdump program" /> + <meta name="Keywords" content="s6 s6-fdholder fd-holding fd-holder fd dump retrieval 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-getdump</tt> program </h1> + +<p> +<tt>s6-fdholder-getdump</tt> connects to a +<a href="s6-fdholderd.html">fd-holding daemon</a> listening on a +Unix domain socket, and retrieves its entire state: file descriptors with +their identifiers and expiration dates. It then executes a program with +those file descriptors still open, and the state stored in the +environment. +</p> + +<h2> Interface </h2> + +<pre> + s6-fdholder-getdump [ -t <em>timeout</em> ] <em>path</em> <em>prog...</em> +</pre> + +<ul> + <li> s6-fdholder-getdump executes into <tt><a href="s6-ipcclient.html">s6-ipcclient</a> <em>path</em> +<a href="s6-fdholder-getdumpc.html">s6-fdholder-getdumpc</a> <em>prog...</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-getdumpc.html">s6-fdholder-getdumpc</a> program +gets the server's state over the socket. </li> + <li> It executes into <em>prog...</em> with as many more open +file descriptors as there were in the daemon, and information about those +file descriptors in the environment. </li> +</ul> + +<h2> Options </h2> + +<ul> + <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> + s6-fdholder-getdump /service/fdholderd/s s6-fdholder-setdump /service/fdholderd-2/s +</pre> + +<p> +will get the state of the s6-fdholderd daemon listening on the <tt>/service/fdholderd/s</tt> +socket, and transmit it to the other s6-fdholderd daemon listening on the +<tt>/service/fdholderd-2/s</tt> socket. Note that in this precise case, +the <a href="s6-fdholder-transferdump.html">s6-fdholder-transferdump</a> +program does the same thing more efficiently. +</p> + +<h2> Notes </h2> + +<ul> + <li> s6-fdholder-getdump really executes into <tt>s6-ipcclient +s6-fdholder-getdumpc +<a href="http://skarnet.org/software/execline/fdclose.html">fdclose</a> +6 fdclose 7 <em>prog...</em></tt>, so that <em>prog...</em> does not +have a connection with the fd-holding daemon anymore. If you want to +keep the server connection open for <em>prog...</em>, use +<tt>s6-ipcclient s6-fdholder-getdumpc</tt> manually. </li> + <li> The exact format of the environment given to <em>prog...</em> +is described in the +<a href="s6-fdholder-getdumpc.html">s6-fdholder-getdumpc</a> page. </li> + <li> Getting the whole state of a s6-fdholderd daemon requires specific +privileges. Make sure you properly +<a href="s6-fdholderd.html#configuration">configure the s6-fdholderd +access rights</a> so your client can perform that operation. </li> +</ul> + +</body> +</html> |