Code cleanup related to signal handlers.