file and record locking questions (general)

Allan Streib streib at silver.ucs.indiana.edu
Fri Mar 29 14:07:36 AEST 1991


Just a couple of general questions on file and record locking under
UNIX:

(These questions are all based on my study of Ultrix 4.2 man pages)

- flock (2) and lockf (3) can be used to control concurrent access to
files, allowing cooperating processes to perform consistent operations
on files.  I understand that these system calls are advisory, and do
not (apparently) lock the file to non-cooperating processes.

- I can apparently use fcntl (2) with commands FGETLK, FSETLK, and
FSETLKW to facilitate concurrent file acccess. 

These commands are not mentioned in Rochkind's _Advanced UNIX
Programming_ text.  Are these Ultrix enhancements, or are these
portable?

Thanks for any insight. 

-Allan (streib at silver.ucs.indiana.edu)



More information about the Comp.unix.questions mailing list