Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!rlgvax!vrdxhq!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c,comp.unix.questions Subject: Re: BSD ?= SysV File Locking Message-ID: <9087@mimsy.UUCP> Date: Sat, 24-Oct-87 03:36:36 EST Article-I.D.: mimsy.9087 Posted: Sat Oct 24 03:36:36 1987 Date-Received: Tue, 27-Oct-87 05:49:46 EST References: <463@petro.UUCP> Followup-To: comp.unix.questions Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 15 Keywords: lockf Xref: mnetor comp.lang.c:5141 comp.unix.questions:4667 This is more properly an operating systems question; and I have redirected followups to comp.unix.questions. 4.2/4.3BSD does not support SysV-style file locking via lockf(). It does, however, support file locking. lockf() allows locking a range of bytes within a file, while 4BSD's flock() locks entire files. flock() locks are purely advisory: flock() locks only against other flock()s. I do not know the precise details of lockf() semantics. The two systems are likely to have source-code compatible locking once the POSIX standard is adopted. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris