svscan optionally starts a pair of supervise 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. (In versions 0.70 and below, it does this if s is sticky.) svscan needs two free descriptors for each pipe.
Every five seconds, svscan checks for subdirectories again. If it sees a new subdirectory, it starts a new supervise process. If it sees an old subdirectory where a supervise process has exited, it restarts the supervise 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 supervise, it prints a message to stderr; it will try again five seconds later.
If svscan is given a command-line argument, it switches to that directory when it starts.