update signal handling and spin_once behavior