supervise wrapper instead of
$PATHto the value of
$SUPERVISE_PATH(which was set by svclean-svscan to the original value of
$PATH) and unsets
$SUPERVISE_ENVis set, it uses that directory to configure its environment with
svclean/redirect_2_1" exists within the service directory, then file descriptor 1 is dup'ed to descriptor 2, so
supervise's error output will go to the service's own logger.
svclean/keep_5" exists within the service directory, descriptor 5 is not closed; otherwise, it is. Likewise for
svclean/keep_4and descriptor 4, and for
svclean/keep_3and descriptor 3.
svclean/shutdown" does not exist within the service directory, then descriptor 0 is put in blocking mode for loggers, and
superviseis executed normally. Otherwise, for normal services (and for loggers whose descriptor 0 is not immediately readable), the wrapper exits without running
supervise; for loggers whose descriptor 0 is immediately readable, descriptor 0 is made non-blocking and
superviseis executed. Loggers are expected to exit after they read all currently available input and descriptor 0 is in non-blocking mode; the next read will result in
multilogbehaves this way.
Add this command to your system boot scripts, to ensure that your services come up:
rm -f /service/*/svclean/shutdown /service/*/log/svclean/shutdown
The wrapper distinguishes normal services from loggers by checking whether
descriptor 0 is a pipe. Do not run
svclean-svscan with a pipe
on descriptor 0.