Is HDB locking safe?

Doug djs at nimbus3.uucp
Sat Aug 18 07:10:05 AEST 1990


In article <YZ85N+6 at xds13.ferranti.com> peter at 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 at cis.ohio-state.edu    Phone:+1 614 459-1889



More information about the Comp.unix.wizards mailing list