Mandatory locking (was Re: the 'l' permission)

Leslie Mikesell les at chinet.chi.il.us
Tue Nov 29 08:47:08 AEST 1988


In article <228 at milhow1.UUCP> how at .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



More information about the Comp.unix.xenix mailing list