From 6435644d7c75441f1b8faf7935265da43cffc0e1 Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Thu, 6 Jun 2019 21:39:08 +1100
Subject: [PATCH] udpate

---
 doc/66-svctl.html | 51 ++++++++++++++++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 18 deletions(-)

diff --git a/doc/66-svctl.html b/doc/66-svctl.html
index b43bf5e4..142c9a0e 100644
--- a/doc/66-svctl.html
+++ b/doc/66-svctl.html
@@ -23,15 +23,23 @@
 
 <h2> Interface </h2>
 	<pre>
-	66-svctl [ -h ] [ -v <em>verbosity</em> ] [ -l <em>live</em> ] [ -t <em>tree</em> ] [ -T <em>timeout</em> ] [ -n <em>death</em> ] [ -u| U | d | D | r | R | K | X ] <em>service(s)</em>
+	66-svctl [ -h ] [ -v <em>verbosity</em> ] [ -l <em>live</em> ] [ -t <em>tree</em> ] [ -T <em>timeout</em> ] [ -n <em>death</em> ] [ -u | d | r | K | X ] <em>service(s)</em>
 	</pre>
 
 	<p>
       This tool expects to find an already supervised <em>service</em> at <em>live</em> defined in the given <em>tree</em> and an already running <em>scandir</em>. 
       <br>(!) This tool only deals with <em>'classic'</em> services&mdash;see <a href="66-dbctl.html"><tt>66-dbctl</tt></a> for other types of services.
     </p>
-    <p>Multiple <em>services</em> can be handled by seperating their names with a space. <tt>66-svctl</tt> gathers each of these services in a list called <em>selection</em>.</p>
-	
+    <p>Multiple <em>services</em> can be handled by seperating their names with a space. <tt>66-svctl</tt> gathers each of these services in a list called <em>selection</em>.
+    It try to be quicker as possible and send command to the <em>selection</em> asynchronously.</p>
+<h2>Exit codes</h2>
+	<p>
+		<ul>
+			<li>0: success, the wanted state has been reached.</li>
+			<li>110: wrong usage.</li>
+			<li>111: system call failed.</li>
+		</ul>
+	</p>
 <h2> Options </h2>
 
 	<ul>
@@ -57,31 +65,24 @@
 		</li>
 		 
 		<li> 
-			<tt>-T&nbsp;<em>timeout</em>&nbsp;</tt></tt>&nbsp;: specifies a general timeout (in milliseconds)
-			after which <tt>66-svctl</tt> will exit 111 with an error message if the <em>selection</em> still hasn't reached the desired state for each <em>service</em>;
-			defaults to 0 (blocks indefinitely).
+			<tt>-T&nbsp;<em>timeout</em>&nbsp;</tt></tt>&nbsp;: specifies a timeout (in milliseconds)
+			after which <tt>66-svctl</tt> will stop to try to reach the desired state of the <em>service</em>; defaults to 3000. <em>timeout</em> is apply for each service of the selection. If you want to set <em>timeout</em> for each <em>service</em> separately use the <tt>@timeout-up</tt> or <tt>@timeout-down</tt> key into the <a href="frontend.html">frontend</a> service file instead. In such case this option has <strong>no effect</strong>.
 		</li>
 		 
 		<li> 
 			<tt>-n&nbsp;<em>death</em>&nbsp;</tt>&nbsp;: specifies the maximum number of service death events that the supervisor will keep track of.
-			If the service dies more than this number of times, <tt>66-svctl</tt> will exit 111 with an error message if the <em>services</em> still hasn't reached the desired state.
-			This option has <strong>no effect</strong> if a <em>maxdeath</em> was defined for the given service at parsing time&mdash;see <tt><a href="66-frontend.html">frontend</a></tt>.
-			If this option is not specified and no <em>max-death-tally</em> file exists the maximum allowed deaths will default to 3.
+			If the service dies more than this number of times, <tt>66-svctl</tt> will stop to try to reach the desired state of the <em>services</em>.
+			This option has <strong>no effect</strong> if a <tt>@maxdeath</tt> was defined for the given service at parsing time&mdash;see <tt><a href="66-frontend.html">frontend</a></tt>.
+			If this option is not specified and no <em>max-death-tally</em> file exists the maximum allowed deaths will default to 5.
 		</li>
 		<li> 
-			<tt>-u|U&nbsp;</tt>&nbsp;: sends an <em>up</em> signal to the <em>service</em>. Uppercase <tt>U</tt> asks for readiness notification and searches for a <em>notification-fd</em>
-			file&mdash;see <tt><a href="https://skarnet.org/software/s6/notifywhenup.html">service startup notifications</a></tt> and <tt><a href="66-frontend.html">frontend</a></tt>.
-			If this file doesn't exist <tt>66-svctl</tt> will automatically change to lowercase <tt>u</tt> and warn the user about the change.
+			<tt>-u&nbsp;</tt>&nbsp;: sends an <em>up</em> signal to the <em>service</em>. It searches for a <em>notification-fd</em> file&mdash;see <tt><a href="https://skarnet.org/software/s6/notifywhenup.html">service startup notifications</a></tt> and <tt><a href="66-frontend.html">frontend</a></tt>. If this file exist <tt>66-svctl</tt> will automatically change to uppercase <tt>U</tt>.
 		</li>
 		<li> 
-			<tt>-d|D&nbsp;</tt>&nbsp;: sends a <em>down</em> signal to the <em>service</em>. Uppercase <tt>D</tt> asks for readiness notification and searches for a <em>notification-fd</em>
-			file&mdash;see <tt><a href="https://skarnet.org/software/s6/notifywhenup.html">service startup notifications</a></tt> and <tt><a href="66-frontend.html">frontend</a></tt>.
-			If this file doesn't exist <tt>66-svctl</tt> will automatically change to lowercase <tt>d</tt> and warn the user about the change.
+			<tt>-d&nbsp;</tt>&nbsp;: sends a <em>down</em> signal to the <em>service</em>. It searches for a <em>notification-fd</em> file&mdash;see <tt><a href="https://skarnet.org/software/s6/notifywhenup.html">service startup notifications</a></tt> and <tt><a href="66-frontend.html">frontend</a></tt>. If this file exist <tt>66-svctl</tt> will automatically change to uppercase <tt>D</tt>.
 		</li>
 		<li> 
-			<tt>-r|R&nbsp;</tt>&nbsp;: sends a <em>reload</em> signal to the <em>service</em>. By default, the signal is a SIGTERM; this can be configured via the <tt>@down-signal</tt> field in the <tt><a href="66-frontend.html">frontend</a></tt> service file. Uppercase <tt>R</tt> asks for readiness notification and searches for a <em>notification-fd</em>
-			file&mdash;see <tt><a href="https://skarnet.org/software/s6/notifywhenup.html">service startup notifications</a></tt> and <tt><a href="66-frontend.html">frontend</a></tt>.
-			If this file doesn't exist <tt>66-svctl</tt> will automatically change to lowercase <tt>r</tt> and warn the user about the change.
+			<tt>-r&nbsp;</tt>&nbsp;: sends a <em>reload</em> signal to the <em>service</em>. By default, the signal is a SIGTERM; this can be configured via the <tt>@down-signal</tt> field in the <tt><a href="66-frontend.html">frontend</a></tt> service file. It searches for a <em>notification-fd</em> file&mdash;see <tt><a href="https://skarnet.org/software/s6/notifywhenup.html">service startup notifications</a></tt> and <tt><a href="66-frontend.html">frontend</a></tt>. If this file exist <tt>66-svctl</tt> will automatically change to uppercase <tt>R</tt>.
 		</li>
 		<li> 
 			<tt>-X&nbsp;</tt>&nbsp;: exit. The supervisor of the service will exit too. This command should normally never be used on a working system.
@@ -90,10 +91,24 @@
 			<tt>-K&nbsp;</tt>&nbsp;: sends a SIGKILL to the <em>service</em> and keep it down.
 		</li>
 	</ul>
+
+<h2> <a href="https://skarnet.org/software/s6/s6-svc.html">s6-svc</a> corresponding signal</h2>
+	<p>
+		<ul> from 66-svctl to s6-svc
+			<li><tt>-u</tt> -> <tt>-u</tt></li>
+			<li><tt>-U</tt> -> <tt>-uwU</tt></li>
+			<li><tt>-d</tt> -> <tt>-d</tt></li>
+			<li><tt>-D</tt> -> <tt>-uwD</tt></li>
+			<li><tt>-r</tt> -> <tt>-r</tt></li>
+			<li><tt>-X</tt> -> <tt>-xd</tt></li>
+			<li><tt>-K</tt> -> <tt>-kd</tt></li>
+		</ul>
+	</p>
 <h2> Note </h2>
 <p>You can also send a signal in a similar fashion to a <em>'classic'</em> service with the <tt><a href="https://skarnet.org/software/s6/s6-svc.html">s6-svc</a></tt> tool which has the philosophy <em>"launch and forget"</em>.
 In contrast to <tt>s6-svctl</tt> this does not care for the exit status of the service when a signal is sent.</p>
 <p>As an extra convenience the <tt>-n</tt> options allow you to deal directly on the command line with 
 <em>max-death-tally</em> even if these were not specified explicitely in the services frontend file and no corresponding files exist.</p>
+
 </body>
 </html>
-- 
GitLab