>Use the exclusive flag when calling open(2) -- must be done every time. You mean O_EXCL? That flag isn't an exclusive-use open flag; it's an "exclusive create" flag. It only causes an error if O_CREAT is also set and the file already exists.