allow calling exit() in an at_exit handler