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: Lyndon Nerenberg
Subject: Re: [Nmh-workers] Locking - which to use?
Date: Sun, 5 Feb 2012 09:40:34 -0800

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).

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

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.

--lyndon




reply via email to

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