I have a program that is set to run according to /etc/inittab. I'm setting this program to respawn whenever it exit or killed. This is the /etc/inittab file:

ac:2345:respawn:/bin/myprogram -n

What my program do is read from /etc/passwd to get a path from specific user and open a database. Unfortunately someone set the wrong path in that file which causes the program to use 100% cpu usage. So what I did was just exiting the program if it fails to open database.

The problem is, it will respawn again because of the inittab and go back to the same situation. This problem will keep looping and it might be hard for user to notice that myprogram is actually having a problem. Is there any way for us to limit the respawn in /etc/inittab?

  • Does it respawn several duplicate processes?
    – Geremia
    Commented Dec 15, 2016 at 17:59


You must log in to answer this question.

Browse other questions tagged .