Standard implementation of a server main() method to handle os signals.