> > if (fcntl(fd,F_SETLK,&fl) == -1) { > > close(fd); > > "and a library function that does succeed is allowed > to change errno." -- errno manpage (Feeling so stupid!) Thanks! I know this, of cource, and even remember thinking about this when I looked at the source - but for some reason I didn't check it properly anyway. I'll upload a fixed version soon.