I had a look at the errflag logic and admittedly I don't understand everything/much. However I noticed that other places that restore the errflag preserve the ERRFLAG_INT bit. Maybe the same should be done here, even though it may not be that important as we are on the exit path anyway. I also wondered whether signals.c/dotraps would be a better place for the new logic. It already has special logic for SIGEXIT and this way the new logic would be guaranteed to apply to all runs of SIGEXIT. Philippe