If a subdirectory sub is sticky, svscan starts a pair of supervise processes, one for sub, one for sub/log, with a pipe between them. 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 sticky 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 a minute later.
If svscan is given a command-line argument, it switches to that directory when it starts.
mkdir /service chmod 755 /serviceThen put
csh -cf 'svscan /service &'into your system's boot scripts, typically /etc/rc.local or /etc/init.d/boot. The system's boot path must not contain ., and it must contain the directory where svscan is installed. If it doesn't, set your favorite path explicitly:
env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin csh -cf 'svscan /service &'Reboot now, and verify that svscan is running.
To install a new service, make a symbolic link from /service/sub to a directory elsewhere in the filesystem. svscan will spot the link within five seconds and will start a supervise process, or two supervise processes if sub is sticky. You can then use svc on /service/sub to control the service.
SUN's sac program runs ``port monitors'' listed in /etc/saf/_sactab.