[Mailman-developers] More mailman locking issues

Christian Tismer tismer@appliedbiometrics.com
Tue, 05 May 1998 22:16:49 +0200


Barry A. Warsaw wrote:
[a lot :]

> On the other hand, creation of directories *is* atomic across all
> versions of NFS, AFAIK, so perhaps it makes more sense to create a
> dot-directory that locks the resource.  You'd have to use mkdir() and
> check for EEXIST.  You'd basically busy-loop in either case waiting
> for the lock to be given up.
> 
> So creating a dot-directory representing a lock is probably the
> most portable, safest, and easiest way to do it.

Another easy way is to simply use the "lockfile" utility which comes
with procmail. Procmail has its own install script to check for the
locking abilities of the particular installation and does intense
testing, and I never got any problems with it when I was using 
smartlist, which is a procmail based minidomo. 
(BTW, reading the smartlist source can cause serious damage to your 
brain, it is write-only-coded procmail and shell).

If one needs a quick and immediately working solution, I can
recommend this, at least give it a slot in your "tips&tricks" box.

-- 
Christian Tismer             :^)   <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.skyport.net
10553 Berlin                 :     PGP key -> http://pgpkeys.mit.edu
     we're tired of banana software - shipped green, ripens at home