The real pros generalized this concept into so-called "supervision trees" - building your system as a hierarchy, where whenever a program misbehaves in any way, it gets restarted by a higher-level program, which itself will also be restarted if it can't get a handle on things, recursively to the top of hierarchy.
(Yes, talking about Erlang/OTP here.)