s6

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

s6-fdholder-transferdump.html (3389B)


      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-transferdump program</title>
      7     <meta name="Description" content="s6: the s6-fdholder-transferdump program" />
      8     <meta name="Keywords" content="s6 s6-fdholder fd-holding fd-holder fd dump transfer 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-transferdump</tt> program </h1>
     20 
     21 <p>
     22 <tt>s6-fdholder-transferdump</tt> connects to two separate
     23 <a href="s6-fdholderd.html">fd-holding daemons</a> and
     24 transfers the content of the first one to the second one.
     25 </p>
     26 
     27 <h2> Interface </h2>
     28 
     29 <pre>
     30      s6-fdholder-transferdump [ -t <em>timeoutfrom:timeoutto</em> ] <em>pathfrom</em> <em>pathto</em>
     31 </pre>
     32 
     33 <ul>
     34   <li> <tt>s6-fdholder-transferdump</tt> connects to a
     35 <a href="s6-fdholderd.html">s6-fdholderd</a> server process listening on
     36 <em>pathfrom</em> and gets the whole set of file descriptors from
     37 this server, with their identifiers and (when relevant) expiration
     38 dates. </li>
     39  <li> It then connects to a different instance of
     40 <a href="s6-fdholderd.html">s6-fdholderd</a>, listening on <em>pathto</em>,
     41 and stores the set of file descriptors to it. The set is
     42 <em>added</em> to the second server, which keeps the descriptors
     43 it was already holding. </li>
     44 </ul>
     45 
     46 <h2> Options </h2>
     47 
     48 <ul>
     49 <li> <tt>-t&nbsp;<em>timeoutfrom</em>:<em>timeoutto</em></tt>&nbsp;:
     50 if the operations cannot be
     51 processed in <em>timeoutfrom</em> (for the connection to <em>pathfrom</em>)
     52 or <em>timeoutto</em> (for the connection to <em>pathto</em>) milliseconds,
     53 then fail with an error message.
     54 Communications with the servers should be near-instant, so this option is
     55 only here to protect users against programming errors (connecting to the
     56 wrong socket, for instance). </li>
     57 </ul>
     58 
     59 <h2> Exit codes </h2>
     60 
     61 <ul>
     62  <li> 0: success. </li>
     63  <li> 1: the source server denied the operation. The meaning of the error messages
     64 is explained <a href="s6-fdholder-errorcodes.html">here</a>. </li>
     65  <li> 2: the destination server denied the operation. The meaning of the error messages
     66 is explained <a href="s6-fdholder-errorcodes.html">here</a>. </li>
     67  <li> 100: wrong usage. </li>
     68  <li> 111: system call failed - this includes attempting to connect to a
     69 nonexistent socket, or one where no <a href="s6-fdholderd.html">s6-fdholderd</a>
     70 daemon is listening. </li>
     71 </ul>
     72 
     73 <h2> Notes </h2>
     74 
     75 <ul>
     76  <li> Dumping the entire state of <a href="s6-fdholderd.html">s6-fdholderd</a>
     77 requires special authorizations. Make sure the s6-fdholderd instances are
     78 <a href="s6-fdholderd.html#configuration">configured</a> to accept
     79 dump-getting and dump-setting requests from your client. </li>
     80  <li> A typical use case of
     81 <a href="s6-fdholder-transferdump.html">s6-fdholder-transferdump</a> is
     82 when the main fd-holding daemon needs to upgrade, or restart for some reason.
     83 Transferring the file descriptors into another, temporary fd-holding daemon
     84 instance allows it to restart without losing the descriptors. </li>
     85 </ul>
     86 
     87 </body>
     88 </html>