svscan starts one
process for each subdirectory of the current directory, up to a limit of 1000
svscan skips subdirectory names starting with dots.
must be in
svscan optionally starts a pair of
processes, one for a subdirectory
s, one for
s/log, with a pipe between them. It does this if the name
s is at most 255 bytes long and
s/log exists and is a directory. (In versions 0.70 and below, it does this if
s is sticky.)
svscan needs two free descriptors for each pipe.
log-service is specified and the named subdirectory exists,
svscan starts the service found there and redirects its output through it.
This service is started before any other.
Every five seconds,
svscan checks for subdirectories again. If it sees a new subdirectory, it starts a
process. If it sees an old subdirectory where a
process has exited, it restarts the
process. In the
log case it reuses the same pipe so that no data is lost.
svscan is designed to run forever. If it has trouble creating a pipe or running
it prints a message to stderr; it will try again five seconds later.
svscan is given a command-line argument
directory, it switches to that
directory when it starts.