Under Linux what would be the best way for a program to restart itself on a crash by catching the exception in a crashhandler (for example on a segfault)?
simplest is
while [ 1 ]; do ./program && break; done
basically, you run program until it is return 0, then you break.