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 13:15:43 -0500

Lyndon wrote:

> On 2012-02-05, at 8:49 AM, David Levine wrote:
>
> > Or to really
> > play it safe, have configure determine which are available
> > and use them all?
>
> At the same time? Sounds like a recipe for deadlock to me. And it won't
> work correctly, if at all, on platforms that implement one or more of
> fcntl/flock/lockf as wrappers around one of the others (e.g. Solaris).

So it sounds like picking one default for each platform and
allowing run-time selection is the way to go.

> configure should be able to set this on a per-platform basis.

It can't because it depends on what other applications use.

> As for internal locking, it's a toss-up between flock and lockf. To me
> the tie breaker is which of the two gets along best with network mounted
> filesystems these days (and think AFP and CIFS in addition to NFS).
>
> And forget about fcntl -- the semantics are too broken for
> consideration. If neither of flock/lockf are available, we can fall back
> to dot locking.

Fedora /bin/mail uses fcntl and Mutt recommends it.
procmail can use it.  I haven't had any problems since I
starting using fcntl.  I did see problems with dot locking,
I expect because other applications weren't using it.

David



reply via email to

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