errno is initialised to 0 at program startup