Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Aug 2000 20:14:54 +0200
From:      Gerhard Sittig <Gerhard.Sittig@gmx.net>
To:        FreeBSD-SECURITY <freebsd-security@FreeBSD.ORG>
Subject:   Re: pine 4.21 port issues?
Message-ID:  <20000809201454.P261@speedy.gsinet>
In-Reply-To: <20000809092250.A48327@strontium.scientia.demon.co.uk>; from ben@FreeBSD.org on Wed, Aug 09, 2000 at 09:22:51AM %2B0100
References:  <20000808201626.I261@speedy.gsinet> <Pine.GSO.4.10.10008090908070.4913-100000@nenya.ms.mff.cuni.cz> <20000809092250.A48327@strontium.scientia.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 09, 2000 at 09:22 +0100, Ben Smithurst wrote:
> Vladimir Mencl, MK, susSED wrote:
> > 
> > Well, does anybody now, how the locking against the MTA is
> > done?
> 
> fcntl() or flock() in most cases, I think.  Or dotlocking,
> where to lock $FILE you create $FILE.lock with O_EXCL|O_CREAT
> so it fails if the lock already exists, but that seems crude
> really, when fcntl()/flock() are so much easier and probably
> more efficient and reliable.
> 
> > How do multiple copies of the MTA lock against each other
> > (e.g., multiple procmails) ? And how does finally an MUA lock
> > against the MTA ?
> 
> All the same way.  If the file is locked, neither the MTA or
> the MUA cares or knows what has locked it, they wait until it's
> unlocked.

But procmail seems to be very aware of that all these locking
mechanisms aren't implemented everywhere equally well and have
some "tricky aspects" (to avoid the "bugs" or "indeterministic"
or "unreliable" words) in various environments.  There's a test
run at setup time to find a combination of the above three
methods that will result in reliable locks in _your_ net.  So I
guess it's something only procmail does this way and others don't
know about.  Luckily one can specify lockfiles in procmailrc
rules and there's a lockfile(1) command handing procmail's
internal (and for _your_ environment well tested) locking into
shell scripts in case you need it.


virtually yours   82D1 9B9C 01DC 4FB4 D7B4  61BE 3F49 4F77 72DE DA76
Gerhard Sittig   true | mail -s "get gpg key" Gerhard.Sittig@gmx.net
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000809201454.P261>