Set up signal handling.