diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-20 20:20:54 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-20 20:20:54 +0000 |
commit | a3cdeecf0033919e3b5a79c17c19b5ac98719256 (patch) | |
tree | 92a930930f18a4f8ae897b1a69c39358137ce1e2 /doc/s6-notifywhenup.html | |
parent | bd34de9054cec794d96b0fde1eee9100e1d34215 (diff) | |
download | s6-a3cdeecf0033919e3b5a79c17c19b5ac98719256.tar.xz |
- Add timeout-finish support and "down-readiness"
- LOTS of refactoring to make this work
- Remove s6-notifywhenup
- s6-supervise now rocks the casbah
- rc for 2.2.0.0
Diffstat (limited to 'doc/s6-notifywhenup.html')
-rw-r--r-- | doc/s6-notifywhenup.html | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/doc/s6-notifywhenup.html b/doc/s6-notifywhenup.html deleted file mode 100644 index cdfa693..0000000 --- a/doc/s6-notifywhenup.html +++ /dev/null @@ -1,111 +0,0 @@ -<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-notifywhenup program</title> - <meta name="Description" content="s6: the s6-notifywhenup program" /> - <meta name="Keywords" content="s6 command s6-notifywhenup fifodir notification event notifier send service daemon ready" /> - <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> - </head> -<body> - -<p> -<a href="index.html">s6</a><br /> -<a href="http://skarnet.org/software/">Software</a><br /> -<a href="http://skarnet.org/">skarnet.org</a> -</p> - -<h1> The s6-notifywhenup program </h1> - -<em> -<p> -Starting with s6-2.1.4.0, the s6-notifywhenup program has been deprecated, -because there was still a case (albeit extremely rare) where a race -condition would occur and readiness would be improperly advertised. -Readiness notification for a service can now be achieved via a -<tt>notification-fd</tt> file in the -<a href="servicedir.html">service directory</a>, containing the -number of the descriptor the service will write its readiness -notification newline to. The notification will directly be picked by -<a href="s6-supervise.html">s6-supervise</a>. <br /> -</p> - -<p> - Quick upgrade recipe: for every service using s6-notifywhenup, -replace the s6-notifywhenup invocation in your run script with -<tt>fdmove 1 3</tt>, then perform <tt>echo 3 > notification-fd</tt>. -Done! -</p> -</em> - -<p> -s6-notifywhenup launches a daemon while listening to a file descriptor, -and sends a 'U' event to a <a href="fifodir.html">fifodir</a> when it -receives something on that file descriptor. -</p> - -<p> -<a href="notifywhenup.html">This page</a> explains why this program is -needed. -</p> - -<h2> Interface </h2> - -<pre> - s6-notifywhenup [ -d <em>fd</em> ] [ -e <em>fifodir</em> ] [ -f ] [ -X ] [ -t <em>timeout</em> ] <em>prog...</em> -</pre> - -<ul> - <li> s6-notifywhenup forks and executes <em>prog...</em> as the -parent, with a pipe from <em>prog...</em>'s stdout to the child. </li> - <li> The child waits for a newline (<tt>\n</tt>) to be written -on the pipe. When it gets it, it creates a -<tt>./supervise/ready</tt> file then sends a 'U' event to the -<tt>./event</tt> fifodir. </li> - <li> The child exits 0. </li> -</ul> - -<h2> Options </h2> - -<ul> - <li> <tt>-d <em>fd</em></tt> : listen to -<em>prog</em>'s output on descriptor <em>fd</em>. The default is 1. </li> - <li> <tt>-e <em>fifodir</em></tt> : send a 'U' event to fifodir -<em>fifodir</em>. Default is <tt>./event</tt>. </li> - <li> <tt>-f</tt> : simple fork. Normally, s6-notifywhenup doubleforks, -in order to accommodate for a -<em>prog</em> that does not expect to have a child and avoid a -pending zombie. This option avoids the doublefork, but it should only be -set if <em>prog</em> reaps even children it doesn't know it has. </li> - <li> <tt>-t <em>timeout</em></tt> : if no EOF has been received -after <em>timeout</em> milliseconds, exit without sending the event. -Default is 0, meaning infinite. </li> - <li> <tt>-X</tt> : fake readiness. s6-notifywhenup will actually send -the newline itself before executing <em>prog</em>. This option should in -principle never be used. </li> -</ul> - -<h2> Notes </h2> - -<ul> - <li> s6-notifywhenup executes <em>prog...</em> as the parent in order -for <em>prog</em> to keep the same pid, which is vital for supervised -processes. </li> - <li> s6-notifywhenup can be used, for instance, with -<a href="s6-ipcserver.html">s6-ipcserver</a> -and its <tt>-1</tt> option, so that reliable startup notification is -achieved. <tt>s6-notifywhenup -f s6-ipcserver -1 <em>args</em></tt> will -send a 'U' event to <tt>./event</tt> when s6-ipcserver is actually -listening to its socket. </li> - <li> The <a href="s6-svwait.html">s6-svwait</a> program can be used -to wait for 'U' events, as well as the -<a href="s6-svlisten1.html">s6-svlisten1</a> and -<a href="s6-svlisten.html">s6-svlisten</a> programs. </li> - <li> The <tt>supervise/ready</tt> file, when created, contains at least -the absolute time when s6-notifywhenup detected service readiness. The -format and contents of this file are subject to change. </li> -</ul> - -</body> -</html> |