in reply to Re: Disappearing File
in thread Disappearing File

What you have said is true. There really should be no case where the counter will decrease, even if the lock fails. My question is, what's causing the file to be deleted? The code I provided is the only code that edits the "counter" file. Gorby

Replies are listed 'Best First'.
•Re: Re: Re: Disappearing File
by merlyn (Sage) on Jan 13, 2004 at 16:50 UTC
    Just a thought, but in all the times I've written flocking apps, I've always used append mode instead of create mode. Perhaps I do this because somewhere I've got bitten by create mode removing the file to create it empty, and that of course would have another locker still holding the old (unlinked) file locked, even though I can now lock the new one.

    Try changing your lockfile open to an append, and rerun your tests. I apologize if that doesn't fix it, but it is suspicious.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.