Subject: Re: /var/mail permissions...
To: None <cjs@portal.ca, current-users@NetBSD.ORG>
From: Ty Sarna <tsarna@endicor.com>
List: current-users
Date: 05/25/1997 10:33:46
In article <Pine.NEB.3.93.970524203922.23222P-100000@gnostic.cynic.net> you write:
> On Sat, 24 May 1997, Patrick Welche wrote:
> 
> That's fine. flock() and fcntl() use the same underlying lock system
> in the kernel, so each will honour the other's locks.

To clarify, this is true on 4.4BSD systems, but not generally.  Elm by
default will try to use all three types of locking to protect itself
from programs trying any one of them.  On NetBSD that breaks because elm
will flock() the file and then try to fnctl() lock it (or vice versa, I
forget), failing the second time because it's already locked.  On most
systems this works because flock() and fcntl() are oblivious to each
other.