On Thu, 4 Mar 1999, Alan Zimmerman wrote:

> For an embedded task that must be kept running, I am considering an
> entry in /etc/inittab with the 'respawn' option set.  Will this work?
> Does anyone know what sampling interval is used by init before it notices
> that the process has died?

As someone else posted, it should happen almost immediately (by the next
time init is schedule()d).

Be aware that if init notices that it is constantly respawning a process,
it will stop trying to respawn that process for a while.  On my slackware
3.6 (?) system, init's manpage says:

       If  init finds that it is continuously respawning an entry
       more than 10 times in 2 minutes, it will assume that there
       is  an error in the command string, generate an error mes-
       sage on the system console, and  refuse  to  respawn  this
       entry  until either 5 minutes has elapsed or it receives a
       signal.  This prevents it from eating up system  resources

My debian 2.0 init manpage says the same thing.

This behaviour may not be acceptable to your application.

This would be a good thing to have in the embedded application shell I
keep blabbering about: an application that monitors certain programs, but
if they keep dying fast, you can either emulate init's behaviour, or maybe
we know that constant dying and restarting is normal (although I can't
think of a reason why off-hand), so continue to respawn the entry.

Hacking init itself would be a good way to do this.  Or maybe not...

--Jeremy

Jeremy Impson
Network Engineer
Advanced Technologies Department
Lockheed Martin Federal Systems
[EMAIL PROTECTED]

Reply via email to