nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Locking - which to use?


From: David Levine
Subject: Re: [Nmh-workers] Locking - which to use?
Date: Sun, 05 Feb 2012 11:49:22 -0500

Ken wrote:

> So Lyndon pointed out to me in private email that on BSD systems we
> should be using flock for locking.  (Specifically, the mail spool on
> those systems uses flock).  But this made me realize that locking in
> nmh is a big mess.

Not just in nmh.  This is old but looks useful:

https://bugzilla.mozilla.org/show_bug.cgi?id=239013#c9

> I think we can divide locking into two categories - the mail spool, and
> everything else.  "Everything else" includes annotations, the context,
> sequences, and the MIME content cache.  It occurs to me that it probably
> doesn't matter which locking method we use for that as long as it's
> consistent inside of nmh.  I think that should be the "best" locking
> available, which would be one of flock/lockf/fcntl.
>
> As for the mail spool ... well, I am wondering if that should be
> runtime configurable.  My thinking is that most people seem to be
> using prebuilt packages and what makes sense on one system might
> not make sense on another, so maybe runtime selection would be
> better.  Right now we default to dot locking unless you override
> it, and that seems wrong to me.

I agree.  How about this:  default to flock on FreeBSD,
fcntl on Linux, and so on for the platforms we know.

For platforms we don't know, use dot locking.  Or to really
play it safe, have configure determine which are available
and use them all?

David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]