linux - how to protect my process from being killed? -


we have mission-critical server program on top of linux , dont't want others terminate accidentally. if terminates or crashes, want restart.

so plan write program, program b. want program b , server program protect each other. if our server program exits, program b restart it. if program b terminates, server program start again. don't have mechanism let program b , server program notified when peer exits.

you can use init babysit process, , since init terminates on reboot, don't need "program b".

add end of /etc/inittab:

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

for information on syntax , other options can found in man inittab


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -