Make trace-interruption logic more robust when sighandlers hang.