Handle process exits as exceptions.