Helps writing applications that terminate gracefully