diff options
Diffstat (limited to 'doc/skabus-dyntee.html')
| -rw-r--r-- | doc/skabus-dyntee.html | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/doc/skabus-dyntee.html b/doc/skabus-dyntee.html new file mode 100644 index 0000000..57b34f3 --- /dev/null +++ b/doc/skabus-dyntee.html @@ -0,0 +1,123 @@ +<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>skabus: the skabus-dyntee program</title> + <meta name="Description" content="skabus: the skabus-dyntee program" /> + <meta name="Keywords" content="skabus dynamic tee dyntee skabus-dyntee unix linux socket pubsub server daemon" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">skabus</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>skabus-dyntee</tt> program </h1> + +<p> +<tt>skabus-dyntee</tt> is a <em>dynamic tee</em>, which is the +simplest publisher daemon possible. +It listens on a Unix domain socket, accepts client connections, and +publishes to its clients everything it reads on its standard +input, as a byte stream. It only writes to clients and never reads +from them. +</p> + +<h2> Interface </h2> + +<pre> + skabus-dyntee [ -1 ] [ -D | -d ] [ -c <em>maxconn</em> ] [ -b <em>backlog</em> ] [ -G <em>gidlist</em> ] [ -g <em>gid</em> ] [ -u <em>uid</em> ] [ -U ] [ -t <em>clienttimeout</em> ] [ -T <em>lameducktimeout</em> ] [ -i <em>rulesdir</em> | -x <em>rulesfile</em> ] <em>path</em> +</pre> + +<ul> + <li> skabus-dyntee binds to the Unix domain socket at <em>path</em>. </li> + <li> If applicable, it drops root privileges. </li> + <li> It listens to its socket and accepts client connections. </li> + <li> Whenever it has data available on its standard input, it reads +that data and writes it to every client it has. It duplicates its +stdin stream to all its clients, hence the name <em>dynamic tee</em>. </li> + <li> When it reads EOF on its stdin, or when it receives a SIGTERM, +it waits for its clients to read their pending data, then exits 0. </li> +</ul> + +<p> + skabus-dyntee is just a wrapper that binds to its socket and +drops privileges before executing into +<a href="skabus-dynteed.html">skabus-dynteed</a>. For details of +the daemon's operation, see the +<a href="skabus-dynteed.html">skabus-dynteed</a> documentation. +</p> + +<h2> Options </h2> + +<ul> + <li> <tt>-1</tt> : write a newline to stdout, before +closing it, right after binding and listening to the Unix socket. +If stdout is suitably redirected, this can be used by monitoring +programs to check when the server is ready to accept connections. </li> + <li> <tt>-d</tt> : allow instant rebinding to the same path +even if it has been used not long ago - this is the SO_REUSEADDR flag to +<a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html">setsockopt()</a> +and is generally used with server programs. This is the default. Note that +<em>path</em> will be deleted if it already exists at program start time. </li> + <li> <tt>-D</tt> : disallow instant rebinding to the same path. </li> + <li> <tt>-c <em>maxconn</em></tt> : accept at most +<em>maxconn</em> concurrent client connections. Default is 40. It is +impossible to set it higher than the value of the SKABUS_DYNTEE_MAX macro, +which is 1000. + <li> <tt>-b <em>backlog</em></tt> : set a maximum of +<em>backlog</em> backlog connections on the socket. Extra +connection attempts will rejected by the kernel. </li> + <li> <tt>-G <em>gidlist</em></tt> : change skabus-dyntee's +supplementary group list to <em>gidlist</em> after binding the socket. +This is only valid when run as root. <em>gidlist</em> must be a +comma-separated list of numerical group IDs. </li> + <li> <tt>-g <em>gid</em></tt> : change skabus-dyntee's groupid +to <em>gid</em> after binding the socket. This is only valid when run +as root. </li> + <li> <tt>-u <em>uid</em></tt> : change skabus-dyntee's userid +to <em>uid</em> after binding the socket. This is only valid when run +as root. </li> + <li> <tt>-U</tt> : change skabus-dyntee's user id, group id and +supplementary group list +according to the values of the UID, GID and GIDLIST environment variables +after binding the socket. This is only valid when run as root. +This can be used with the +<a href="s6-envuidgid.html">s6-envuidgid</a> +program to easily script a service that binds to a privileged socket +then drops its privileges to those of a named non-root account. </li> + <li> <tt>-t <em>clienttimeout</em></tt> : disconnect a client +that has not read its data after <em>clienttimeout</em> milliseconds. +By default, <em>clienttimeout</em> is 0, which means infinite. </li> + <li> <tt>-T <em>lameducktimeout</em></tt> : after +skabus-dyntee has been told to exit, clients will have +<em>lameducktimeout</em> milliseconds to read their pending data, +after which skabus-dyntee will exit anyway. +By default, <em>lameducktimeout</em> is 0, which means infinite. </li> + <li> <tt>-x <em>rulesfile</em></tt> : read access rights +configuration from CDB file <em>rulesfile</em>. </li> + <li> <tt>-i <em>rulesdir</em></tt> : read access rights +configuration from the filesystem in directory <em>rulesdir</em>. </li> +</ul> + +<h2> Notes </h2> + +<ul> + <li> skabus-dyntee does not interpret its options itself. It just +dispatches them to the appropriate program on the command line that +it builds. </li> + <li> From the user's point of view, skabus-dyntee behaves like a +long-lived process, even if the long-lived process itself is called +<a href="skabus-dynteed.html">skabus-dynteed</a>. Every operational detail +of skabus-dynteed applies to skabus-dyntee as well; in particular, +make sure to properly +<a href="skabus-dynteed.html#configuration">configure the clients' +access rights</a>. </li> +</ul> + +</body> +</html> |
