Path: utzoo!utgpu!watmath!clyde!att!chinet!les
From: les@chinet.chi.il.us (Leslie Mikesell)
Newsgroups: comp.unix.xenix
Subject: Re: Mandatory locking (was Re: the 'l' permission)
Message-ID: <7022@chinet.chi.il.us>
Date: 28 Nov 88 22:47:08 GMT
References: <71@attibr.UUCP> <4594@ptsfa.PacBell.COM> <483@auspex.UUCP> <1988Nov26.220052.19423@ateng.ateng.com> <228@milhow1.UUCP>
Reply-To: les@chinet.chi.il.us (Leslie Mikesell)
Organization: Chinet - Public Access Unix
Lines: 15

In article <228@milhow1.UUCP> how@.UUCP (PUT YOUR NAME HERE) writes:
>
>Would someone knowledgable please explain (with examples) the distinction
>between `manditory' and `advisory' locking.  (more than 25 words is ok with
>me :-).   

Dunno if I'm qualified to answer this, but the difference is that advisory
locking requires other programs to test for locks using the lockf() or
fcntl() (or locking()...) functions.  Manditory locks affect all programs
whether they check or not.  Examples would be a database type program that
uses lockf(fd,F_LOCK,size) to coordinate multi-user access to a file and
a backup type program that copies files without checking anything.  A
manditory lock would stop the backup program.

Les Mikesell