From 1738bf400823fd85d0a0271580a208da37744655 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 16 Oct 2016 20:48:05 -0700 Subject: updating rendered manpage for github docs --- index.html | 101 +++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 75 insertions(+), 26 deletions(-) diff --git a/index.html b/index.html index 1113746..10f54ff 100644 --- a/index.html +++ b/index.html @@ -62,6 +62,8 @@ NAME SYNOPSIS DESCRIPTION + CHILD API + HISTORY STATUS COPYRIGHT SEE ALSO @@ -80,43 +82,90 @@

SYNOPSIS

-

einhyrningsins [OPTIONS] -- PROGRAM [PROGRAM_ARGS]

+

einhyrningsins [OPTIONS] [--] PROGRAM [PROGRAM_ARGS]

DESCRIPTION

-

This is a socket multiplexer featuring graceful restarts. It runs multiple -copies of the child program that are passed a shared socket (or more than one) -to bind to and accept connections from. Graceful rolling restarts enable -updates of the child program with zero downtime and no dropped connections.

+

Einhyrningsins is a socket multiplexer featuring graceful restarts. It runs +multiple copies of a child program, each of which are passed a shared socket +(or multiple shared sockets) to bind(2) to and accept(2) connections from. +Graceful, rolling restarts enable updates of the child program with zero +downtime and no dropped connections.

This program requires special support in the child program to achive the -graceful restarts and bind to inherited file descriptors indicated by -environment variables.

- -

einhyrningsins(1) is a partially-comparible re-implementation of einhorn(1) (a -Ruby program) in Rust. Einhorn itself derived from Unicorn.

+graceful restarts (aka, exiting only after all connection close) and to be able +to bind to inherited file descriptors (as indicated by environment variables). +Child programs must also be able to run in parallel: for example, each copy +must not try to write to the same output file without some form of locking.

+

CHILD API

+ +

Einhyrningsins creates children by fork(1)-ing a new process and +execve(1)-ing to run the proces itself. For every socket specified by a -b +flag, a socket is bound in the main einhyrningsins process and then +explicitly flagged to be passed on to the child processes. This means the child +process will already have a valid file descriptor bound to each of the shared +sockets. The file descriptor numbers are passed via the following environment +variables:

+ +
+
EINHORN_FD_COUNT
How many sockets have been passed.
+
EINHORN_FD_<NUM>
One evironment for each socket with NUM from 0 to EINHORN_FD_COUNT-1.
+
+ + +

When einhyrningsins is run in manual mode, each child process should connect +to the control socket (at the UNIX path given by the EINHORN_SOCK_PATH +variable) and write(2) a newline-terminated string like the following, +containing the child's PID number:

+ +

{"command":"worker:ack", "pid":<PID>}

+ +

HISTORY

+ +

Einhyrningsins is a partially-comparible re-implementation of einhorn(1) (a +Ruby program) in Rust. Einhorn itself derived from Unicorn.

+ +

The word "Einhyrningsins" is Icelandic for unicorn.

+

STATUS

-

This is a fun fun hobby project. Still in progress, and notably untested.

+

Einhyrningsins is a for-fun hobby project. It is not feature complete, fully +documented, or tested.

@@ -127,7 +176,7 @@ WARRANTY, to the extent permitted by law.

SEE ALSO

-

einhorn (1), einhyrningsinsctl(1)

+

einhorn(1), einhyrningsinsctl(1), socket(7)

    -- cgit v1.2.3