[comp.unix.questions] Respawning processes.

larocque@jupiter.crd.ge.com (David M. LaRocque) (07/12/90)

I know the answer to my question appeared in a post a 
while back, but I don't recall it.  Sorry. :-(

Anyway, how can one specify that a process be started
automatically when the computer is booted and auto-
matically restarted whenever it dies?  The answer had
to do with starting the process as if it were a tty
or something.  Does one hack up the /etc/gettytab or
/etc/ttytab?  What is the exact syntax?

I'm running Sun 4.0.x operating system.

Thanks, Dave

/**************************************************
 * larocque@crd.ge.com        (518) 387-5805
 * ...!crdgw1!cetus.crd.ge.com!larocque
 **************************************************/

peter@ficc.ferranti.com (Peter da Silva) (07/12/90)

In article <9644@crdgw1.crd.ge.com> larocque@jupiter.crd.ge.com (David M. LaRocque) writes:
> Anyway, how can one specify that a process be started
> automatically when the computer is booted and auto-
> matically restarted whenever it dies?

Put it in inittab:

id:levels:respawn:program

Where "id" is the terminal id (any short reasonable string), and levels is a
list of run levels to run this process at (:23: is a good one).

special:23:respawn:program

> I'm running Sun 4.0.x operating system.

I don't know whether this will help, but that's the way it works in real UNIX.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.
<peter@ficc.ferranti.com>

guy@auspex.auspex.com (Guy Harris) (07/14/90)

>> I'm running Sun 4.0.x operating system.
>
>I don't know whether this will help, but that's the way it works in real UNIX.

SunOS isn't "real UNIX", then; it has a 4.2BSD-flavored "init" prior to
4.0, and a 4.3BSD-flavored "init" in 4.0 and later.  Then again, I
suspect Ninth and Tenth Editions aren't "real UNIX" by that definition,
either, even though they come from the older of the trademark for UNIX
(unless USL 1) now owns the trademark and 2) is sufficiently separate
from AT&T that one could consider AT&T no longer to own the trademark).

peter@ficc.ferranti.com (Peter da Silva) (07/14/90)

Someone said:
> >> I'm running Sun 4.0.x operating system.

I exlained how to solve their problem using System V, and followed with:
> >I don't know whether this will help, but that's the way it works in real UNIX.

In article <3643@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes:
> I suspect Ninth and Tenth Editions aren't "real UNIX" by that definition,

Calm down. I was just getting back at the "BSD is the only real UNIX" folks.
I happen to prefer System V these days, and it gets tiring to be told that
Berkeley (Kitchen) Sink Distribution is god.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.
<peter@ficc.ferranti.com>