Subject: Re: Mail and locking
To: Curt Sampson <>
From: Scott Reynolds <scottr@Plexus.COM>
List: current-users
Date: 12/03/1996 17:43:23
On Tue, 3 Dec 1996, Curt Sampson wrote:

> Flocking is a lot easier to use in the long run. It's easier to program,
> doesn't require write access to the mail spool, and is compatabile with
> non-mail applications, such as vi.

OK, now bear with me:  If you don't have write access to the mail spool,
why do you need a lock?  And if you do have write access to the mail
spool, what if it's not a local filesystem?  What if someone uses ed(1),
instead of vi?  (I'll argue that non-mail applications should never
attempt to modify the mail spool, actually.)  Adding flock() seems only to
add complexity for little gain, if any at all.  In other words, fix the
broken applications that don't understand dot locks.

There's no need to go reinventing the wheel all over.  Write a function
with a reasonable interface and well-defined behavior, then drop it in
where necessary.