[ale] Looking for software to keep processes running.

Greg Freemyer freemyer-ml at NorcrossGroup.com
Thu Feb 5 11:23:25 EST 2004


This is old school, but....

If your programs are meant to run basically anytime the computer is
running, that is exactly what /etc/inittab is designed for.

Things like login prompts, etc. are run from there.

My question is, why does /etc/inittab seem to be out of favor?

10 years ago, it was common to install daemon like processes into there.

Now it seems that most daemons use the rc.d approach.  I don't mind that
approach, but it does not monitor and restart daemons so the daemon
tends to have small parent program like the below that monitor its own
child and restarts it if it dies.

The only thing I can think of is maybe the rc.d approach is easier to
upgrade from version to version.

Greg
-- 
Greg Freemyer

On Thu, 2004-02-05 at 10:58, Chris Fowler wrote:
> while (1) {
>   switch((pid = fork())) {
>     case -1:
>         exit(1);
>     case 0:
>         execl("/bin/program", "/bin/program", 0);
>         exit(1);
>     default:
>       waitpid(pid, NULL, 0);
>   }
> }
> 
> All program must be ran in the foreground and not become a daemon. 
> 
> On Thu, 2004-02-05 at 10:42, Jim Lynch wrote:
> > I've got a number of scripts that start processes that run in user space 
> > that I'd like to keep running.  (RH 7.2).  Is there a utility that would 
> > help me?  I know I can write a script that would do a ps periodically and 
> > make sure the process was still running and if not start it up, but I was 
> > just curious if there was a utility that would automate that process. I 
> > googled for something, but didn't see anything promising, except a 
> > reference to Big Brother.
> > 
> > THanks,
> > Jim.
> > 
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list