From: utzoo!decvax!decwrl!sun!megatest!fortune!hpda!hplabs!hao!seismo!rlgvax!guy Newsgroups: net.unix-wizards Title: Re: mutual exclusion between processes Article-I.D.: rlgvax.173 Posted: Thu Mar 31 11:52:13 1983 Received: Sun Apr 3 03:53:20 1983 References: sri-arpa.745 USG UNIX (and, I believe, 4.2BSD)has a cute trick for this; if you do an "open" with the O_CREAT and O_EXCL bits on in the second argument (note; you can do a create and have the resulting descriptor open for writing *and* reading - it's about time!), if the file already exists an EEXIST error will be returned, and the file will be untouched - even if you are the super-user. Guy Harris RLG Corporation {seismo,mcnc,we13}!rlgvax!guy