s6

Mirror/fork of https://skarnet.org/software/s6/
git clone https://ccx.te2000.cz/git/s6
Log | Files | Refs | README | LICENSE

s6-fdholder-setdump.html (3067B)


      1 <html>
      2   <head>
      3     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      4     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      5     <meta http-equiv="Content-Language" content="en" />
      6     <title>s6: the s6-fdholder-setdump program</title>
      7     <meta name="Description" content="s6: the s6-fdholder-setdump program" />
      8     <meta name="Keywords" content="s6 s6-fdholder fd-holding fd-holder fd dump storage unix socket activation" />
      9     <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
     10   </head>
     11 <body>
     12 
     13 <p>
     14 <a href="index.html">s6</a><br />
     15 <a href="//skarnet.org/software/">Software</a><br />
     16 <a href="//skarnet.org/">skarnet.org</a>
     17 </p>
     18 
     19 <h1> The <tt>s6-fdholder-setdump</tt> program </h1>
     20 
     21 <p>
     22 <tt>s6-fdholder-setdump</tt> connects to a
     23 <a href="s6-fdholderd.html">fd-holding daemon</a> listening on a
     24 Unix domain socket, and dumps a set of file descriptors into
     25 that daemon.
     26 </p>
     27 
     28 <h2> Interface </h2>
     29 
     30 <pre>
     31      s6-fdholder-setdump [ -t <em>timeout</em> ] <em>path</em>
     32 </pre>
     33 
     34 <ul>
     35  <li> <tt>s6-fdholder-setdump</tt> connects to a
     36 <a href="s6-fdholderd.html">s6-fdholderd</a> server process listening on
     37 <em>path</em>. </li>
     38  <li> It attempts to pass a complete state - i.e. a set of file descriptors
     39 with identifiers and expiration dates - to the server. </li>
     40 </ul>
     41 
     42 <h2> Options </h2>
     43 
     44 <ul>
     45 <li> <tt>-t&nbsp;<em>timeout</em></tt>&nbsp;: if the operation cannot be
     46 processed in <em>timeout</em> milliseconds, then fail with an error message.
     47 Communications with the server should be near-instant, so this option is
     48 only here to protect users against programming errors (connecting to the
     49 wrong socket, for instance). </li>
     50 </ul>
     51 
     52 <h2> Exit codes </h2>
     53 
     54 <ul>
     55  <li> 0: success. </li>
     56  <li> 1: the server denied the operation. The meaning of the error messages
     57 is explained <a href="s6-fdholder-errorcodes.html">here</a>. </li>
     58  <li> 100: wrong usage. </li>
     59  <li> 111: system call failed - this includes attempting to connect to a
     60 nonexistent socket, or one where no <a href="s6-fdholderd.html">s6-fdholderd</a>
     61 daemon is listening. </li>
     62 </ul>
     63 
     64 <h2> Notes </h2>
     65 
     66 <ul>
     67  <li> The file descriptors to transmit to the server should of course be
     68 already open in the <tt>s6-fdholder-setdump</tt> program; also, <tt>s6-fdholder-setdump</tt>
     69 should have certain environment variables that describe that set of file
     70 descriptors. The format of the environment is the same as the one set by
     71 <a href="s6-fdholder-getdump.html">s6-fdholder-getdump</a>. </li>
     72  <li> Setting the whole state of an s6-fdholderd daemon requires specific
     73 privileges. Make sure you properly
     74 <a href="s6-fdholderd.html#configuration">configure the s6-fdholderd
     75 access rights</a> so your client can perform that operation. </li>
     76  <li> Previously held fds will still be kept by the server (so, "setting"
     77 the state is more like "adding to" the state), unless there is an identifier
     78 collision, in which case the fd in the transmitted set takes precedence and
     79 the previously held fd is overwritten. </li>
     80 </ul>
     81 
     82 </body>
     83 </html>