Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!ucsd!tut.cis.ohio-state.edu!nimbus3!djs From: djs@nimbus3.uucp (Doug) Newsgroups: comp.unix.wizards Subject: Re: Is HDB locking safe? Message-ID: <1990Aug17.211005.28915@nimbus3.uucp> Date: 17 Aug 90 21:10:05 GMT References: <577@oglvee.UUCP> <4024@rtifs1.UUCP> Reply-To: djs@nimbus3.UUCP (Doug) Organization: AGS Information Services, Inc. Lines: 15 In article peter@ficc.ferranti.com (Peter da Silva) writes: >No sleep is ever enough. The system could simply be busier than you ever >imagined. You don't solve a race problem by narrowing the window: try >checking the return value of the "unlink": that's the point of failure. Another problem is that the process ids can wrap around and some other very long lived process can have that process id, causing uucp and cu to not use that modem. I don't understand why this technique was even used. The System V kernal provides atomic file locking that is released when the process dies or closes the file. Why wasn't that used? Was it for portability? What am I missing? -- Doug Scofea Email: nimbus3!djs@cis.ohio-state.edu Phone:+1 614 459-1889