how to protect my process from being killed?

后端 未结 4 2134
故里飘歌
故里飘歌 2021-01-01 00:32

We have a mission-critical server program on top of Linux and we don\'t want others to terminate it accidentally. If somebody terminates it or it crashes, we want it to rest

4条回答
  •  醉话见心
    2021-01-01 00:54

    You can use init to babysit the process, and since init only terminates on reboot, you don't need a "program B".

    Add to the end of /etc/inittab:

    x:3:respawn:/path/to/my/program
    

    For information on syntax and other options can be found in man inittab

提交回复
热议问题