[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] lockfiles revisited
On Wed, Feb 14, 2001 at 10:21:52AM +0100, Matthias Andree wrote:
> > The idea is now: If the only reason for the lock is to protect
> > the groupinfo, why not lock groupinfo itself? => No problems with
> > race conditions between fcntl() and unlinki() calls anymore. Am I
> > missing something or is this a good idea?
> If someone misses an unlink, your groupinfo is gone. Apart from that, I
> think, using more fine-grained locks is a good idea.
Which unlink? Process open()s groupinfo, acquieres exclusive
fcntl() lock, does whatever there is to do, releases fcntl()
lock. Can be as fine grained as you want, i.e. open(),
fcntl(), rereadactive(), dostuff(),writeactive(), close(),
anytime, anywhere in the calling program.
Fortune cookie of the day:
SHHHH!! I hear SIX TATTOOED TRUCK-DRIVERS tossing ENGINE BLOCKS into
empty OIL DRUMS ...
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list