Xref: utzoo comp.unix.questions:29893 comp.unix.ultrix:6703 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!sol.ctr.columbia.edu!bronze!silver!streib From: streib@silver.ucs.indiana.edu (Allan Streib) Newsgroups: comp.unix.questions,comp.unix.ultrix,cs.unix.questions Subject: file and record locking questions (general) Summary: are they portable across *nix versions? Keywords: record,locking,ultrix Message-ID: <1991Mar29.040736.18783@bronze.ucs.indiana.edu> Date: 29 Mar 91 04:07:36 GMT Sender: news@bronze.ucs.indiana.edu (USENET News System) Distribution: na Organization: Indiana University, Bloomington Lines: 20 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@silver.ucs.indiana.edu)