[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] lockfiles revisited



On Wed, Feb 14, 2001 at 04:09:13PM +0100, Matthias Andree wrote:
> > 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.
> The "unlocking" unlinks (that remove the lock file). Still, open/fcntl
> is dangerous for O_TRUNC or something.

I think we have a misunderstanding here. I want to get rid of the
lockfile. No call to unlink() at all. 

The only thing that needs to be locked is the groupinfo. My idea
was to open the groupinfo file, put an exclusive fcntl() lock on 
it and release the lock by calling close() on the groupinfo
file descriptor.

I don't care about O_TRUNC. No program from the leafnode family
uses O_TRUNC anywhere.

Regards,
        Jo:rg

-- 
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