Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.bugs.4bsd Subject: Re: EXCL without CREAT Message-ID: <6247@utzoo.UUCP> Date: Sat, 21-Dec-85 21:15:34 EST Article-I.D.: utzoo.6247 Posted: Sat Dec 21 21:15:34 1985 Date-Received: Sat, 21-Dec-85 21:15:34 EST References: <5507@allegra.UUCP>, <6220@utzoo.UUCP>, <7022@ki4pv.UUCP> Organization: U of Toronto Zoology Lines: 11 > ] utzoo!henry points out problem of fool opening/locking /etc/passwd > ] and claims that adding open("arg", O_READ|EXCL) re-invents flock() > > Doesn't re-invent flock() -- open()/flock() is not an atomic action. Who cares if the open() succeeds, so long as the process doesn't do anything to the file until a successful flock()? The sequence is not atomic, but that doesn't matter. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry