I have a web service that runs on Linux. Is there a conventional way to ensure the server is restarted in the event of a crash?
I suppose I might have a shell script which does something like this:
while true; do ./myserver; done
But I think the need to attach the script to a session makes this a poor solution. What is the correct way to do this?
Should there be a daemon process which spawns the server as another daemon? Or is there a better way?