[Mailman-Developers] New LockFile.py

Jim Hebert jhebert@compu-aid.com
Tue, 2 May 2000 19:31:36 -0400 (EDT)

Though I'm personally just as happy with future-dates, Barry, if you
really want one more lick at the problem, here's mine: IF:
1) Future dates are a problem
2) Manipulating lockfile contents is a problem

How about this:

For a given "now + delta_to_future" that we want to set an expiry:

make a file, set ctime = delta_to_future (ie epoch + delta_to_future)
                 mtime = now

This is "coherent" for everyone's various tools, has a ctime < mtime <=
now for positive values of delta_to_future. In order to figure out if a
given lockfile needs to expire, you get the ctime as seconds-since-epoch
and add that to mtime, compare to now. Locks can be renewed by either
advancing mtime or ctime, I suppose, so different meaning could be
associated with each if desirable.


Jim Hebert                                       http://www.cosource.com/
jim@cosource.com          The cooperative market for open source software

"Well actually I was considering opening a market in flying pigs. Mostly
because it would be more practical...." -- Alan Cox

On Tue, 2 May 2000 bwarsaw@python.org wrote:

> with race conditions.  Given that Postfix and Big Brother use similar
> techiques, I'm inclined to keep it for Mailman too.  But I definitely
> appreciate the feedback, and will keep your concerns in mind.