[comp.unix.questions] init under Sun OS

field@elvis.cs.pittsburgh.edu (Gus) (08/08/89)

I'm working on a project that needs to maintain lots of processes up on
several sun (running Sun OS 3.5).  All these processes are currently
started from rc.local.

On occasion, some of these processes fie (due to software bugs, a
mistyped pid in a kill, etc.)  When one of these processes dies, I
would like to catch the exiting child, and restart a new one.

So, I created a 'monitor' process and start it from rc.local.  This
process forks/execs all the processes I would like to monitor, and
then just does a wait ().  Piece of cake, right?  But now I have to
deal with the monitor process dying, how do I catch this happning?
Right now, I have a cron job start up every X minutes to handle this.

What I would like to be able to do is have init start these processes
directly, and eliminate the need to have a monitor process.  Is this
possible in Sun OS?  After some looking around, it looks like Sys V
has this capability (Sys V init reads from inittab which contains a 
list of processes to start and possibly restart on receipt of a child
death), but couldn't find anything in Sun OS.

Thanks
Brian
field@elvis.cs.pitt.edu
field@uswat.com