http://bugzilla.spamassassin.org/show_bug.cgi?id=3442





------- Additional Comments From [EMAIL PROTECTED]  2004-05-28 21:31 -------
Subject: Re:  flock locking creates and doesn't clean up lock files

On Fri, May 28, 2004 at 08:46:06PM -0700, [EMAIL PROTECTED] wrote:
> stick around.  quoting the comments ;) --

heh.   we'll have to either 1) document this in quite obvious places,
and/or 2) fix this to not have a problem with unlink.  if it confuses me,
it'll confuse other folks.

>   # do NOT unlink! this would open a race, whereby:
>   #
>   # procA: ....unlock                           (unlocked lockfile)
>   # procB:            lock                      (gets lock on lockfile)
>   # procA:                 unlink               (deletes lockfile)
>   # (procB's lock is now deleted as well!)
>   # procC:                        create, lock  (gets lock on new file)

So if unlink kills the lock, why not do lock(), then unlink() in proc A?
Hrm.  That skips the race condition altogether, assuming you can unlink()
when you have a lock.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to