summaryrefslogtreecommitdiff
path: root/doc/s6-frontend-alias-chpst.html
blob: 8cfe0116d2b6fb104e900181ab4a60d9d6129731 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<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-frontend: the s6-frontend-alias-chpst program</title>
    <meta name="Description" content="s6-frontend: the s6-frontend-alias-chpst program" />
    <meta name="Keywords" content="s6 command s6-frontend alias chpst runit change process state" />
    <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
  </head>
<body>

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

<h1> The <tt>s6-frontend-alias-chpst</tt> program </h1>

<p>
<tt>s6-frontend-alias-chpst</tt> implements
<a href="http://smarden.org/runit/">runit</a>'s
<a href="http://smarden.org/runit/chpst.8.html">chpst</a> command
by rewriting itself into a command line made of idiomatic
chainloading <a href="//skarnet.org/software/s6/">s6</a> commands.
</p>

<h2> Interface </h2>

<pre>
     s6-frontend-alias-chpst [ -v ] [ -P ] [ -0 ] [ -1 ] [ -2 ] [ -u <em>user</em> ] [ -U <em>user</em> ] [ -b <em>argv0</em> ] [ -e <em>dir</em> ] [ -/ <em>root</em> ] [ -n <em>inc</em< ] [ -l|-L <em>lock</em> ] [ -m <em>bytes</em> ] [ -d <em>bytes</em> ] [ -o <em>n</em> ] [ -p <em>n</em> ] [ -f <em>bytes</em> ] [ -c <em>bytes</em> ] <em>prog...</em>
</pre>

<p>
 When s6-frontend has been configured with the
<tt>--enable-aliases-runit</tt> option, the
<tt>s6-frontend-alias-chpst</tt> program is built, and at installation
time, a <tt>chpst</tt> symbolic link is created, pointing to it.
</p>

<p>
 <tt>s6-frontend-alias-chpst</tt> implements most of the functionality of
<a href="http://smarden.org/runit/chpst.8.html">chpst</a>, as closely as
possible. It does so by rewriting itself into a command line that may
invoke one or more of the following programs:
</p>

<ul>
 <li> The Unix <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/nice.html">nice</a> command </li>
 <li> The s6 <a href="//skarnet.org/software/s6/s6-setsid.html">s6-setsid</a> command </li>
 <li> The s6 <a href="//skarnet.org/software/s6/s6-envdir.html">s6-envdir</a> command </li>
 <li> The s6 <a href="//skarnet.org/software/s6/s6-setlock.html">s6-setlock</a> command </li>
 <li> The s6 <a href="//skarnet.org/software/s6/s6-applyuidgid.html">s6-applyuidgid</a> command </li>
 <li> The s6 <a href="//skarnet.org/software/s6/s6-envuidgid.html">s6-envuidgid</a> command </li>
 <li> The s6 <a href="//skarnet.org/software/s6/s6-softlimit.html">s6-softlimit</a> command </li>
 <li> The execline <a href="//skarnet.org/software/execline/fdclose.html">fdclose</a> command </li>
 <li> The execline <a href="//skarnet.org/software/execline/exec.html">exec</a> command </li>
 <li> The non-standard (but ubiquitous) Unix <a href="https://helpmanual.io/man8/chroot/">chroot</a> command </li>
</ul>

<h2> Notes </h2>

<ul>
 <li> When the <tt>-v</tt> option is given,
<tt>s6-frontend-alias-chpst</tt> prints an informational
message to stderr, showing the entire command line it is going to execute into. </li>
 <li> <tt>s6-frontend-alias-chpst</tt> is a convenience program, written
so that runit users can keep using <tt>chpst</tt> while learning the
corresponding idiomatic s6 commands. However, it is not an "official"
interface. <tt>chpst</tt> acts as a big toolbox, whereas s6 prefers the
"one function = one tool" philosophy. It is recommended that runit users
who are new to s6 use the <tt>-v</tt> option to see how their <tt>chpst</tt>
invocation translates into s6 parlance. </li>
 <li> Some <tt>chpst -u</tt> invocations do not translate perfectly
because s6 uses a slightly different model of acquiring user and group
identity via
<a href="//skarnet.org/software/s6/s6-envuidgid.html">s6-envuidgid</a>.
This should not prevent <tt>chpst</tt> from working. </li>
</ul>

</body>
</html>