[Top][All Lists]

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

[Nmh-workers] Locking - which to use?

From: Ken Hornstein
Subject: [Nmh-workers] Locking - which to use?
Date: Sat, 04 Feb 2012 23:17:32 -0500

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.

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.


reply via email to

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