Hello, I think this deserves a "how did this ever work" award :-) The file was being created writeable (the S_IWUSR flag passed to open()) so little wonder GNU/Linux allowed an open-write (causing the test to fail) and who knows how/who this worked on BSD and remote systems. Tested on BSD and GNU/Linux. Baring comment I'll commit in a day or so. Andrew