Code

reset errno right befor the place where we look at it ...