Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.lang.perl Subject: Re: unix process control with perl Message-ID: <128364@uunet.UU.NET> Date: 11 Apr 91 20:40:18 GMT References: Organization: UUNET Communications Services, Falls Church, VA Lines: 20 In article larry@mitra.mitra.com (Larry Williamson) writes: >I have need of a system that can be used to startup a bunch of >programs. This system should be able to restart any process that has >died, or if desired, flag the death (ie. via syslog()). The bunch of >programs to control should be obtained from an ascii file. Have a table of commands you want to run. For each entry, fork and record the command in an associative array indexed by the child's pid. Then wait for a child to die. When it does, restart that entry and record the new pid, or syslog it if it was a one time thing. >All in all, something similiar to the /etc/init & /etc/inittab on >System V machines. Indeed. With a bit of hacking you can create the internal table from inittab itself. -- [rbj@uunet 1] stty sane unknown mode: sane