summaryrefslogtreecommitdiff
path: root/doc/s6-fdholder-retrievec.html
blob: cd49b1ba69c2d400935dfcee83822c53d2d18bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<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: the s6-fdholder-retrievec program</title>
    <meta name="Description" content="s6: the s6-fdholder-retrievec program" />
    <meta name="Keywords" content="s6 s6-fdholder fd-holding fd-holder fd retrieval unix socket activation" />
    <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
  </head>
<body>

<p>
<a href="index.html">s6</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>

<h1> The <tt>s6-fdholder-retrievec</tt> program </h1>

<p>
<tt>s6-fdholder-retrievec</tt> talks to a
<a href="s6-fdholderd.html">fd-holding daemon</a> on its open
descriptors 6 and 7, and retrieves a file descriptor from it,
then executes a program.
</p>

<h2> Interface </h2>

<pre>
     s6-fdholder-retrievec [ -D ] [ -t <em>timeout</em> ] <em>id</em> <em>prog...</em>
</pre>

<ul>
 <li> s6-fdholder-retrievec expects to talk to a listening
<a href="s6-fdholderd.html">s6-fdholderd</a> program on its descriptors 6 and 7. </li>
 <li> It attempts to retrieve a copy of the file descriptor that has been
stored into that daemon under identifier <em>id</em>.
 <li> It then executes into <em>prog...</em>, with the retrieved
file descriptor as standard input. </li>
</ul>

<h2> Options </h2>

<ul>
 <li> <tt>-D</tt>&nbsp;: delete the file descriptor from the server's
storage after retrieval. This option requires writing rights over the
given identifier as well as reading rights: check the server's
<a href="s6-fdholderd.html#configuration">configuration</a>. </li>
 <li> <tt>-t&nbsp;<em>timeout</em></tt>&nbsp;: 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. </li>
</ul>

<h2> Notes </h2>

<ul>
 <li>s6-fdholder-retrievec is the "internal" version of
<a href="s6-fdholder-retrieve.html">s6-fdholder-retrieve</a>. It simply
expects to be run as a UCSPI client, i.e. talking to the server
over descriptors 6 and 7, instead of connecting to the server
itself. </li>
 <li> The error messages for the s6-fdholder suite are explained
<a href="s6-fdholder-errorcodes.html">here</a>. </li>
</ul>

</body>
</html>