HELP LOCKF                                       John Williams, Feb 1989

LIB * LOCKF is a simple POP11 interface to the C library function
'lockf', a tool for file locking. The locks created by 'lockf' are
advisory (i.e. they do not affect file access permissions), and are
ephemeral (i.e. they only exist for the duration of the process that
creates the lock).  See MAN 3 LOCKF for full details.

LIB LOCKF defines the following procedures:

syslockf(DEVICE, LOCK_OP, NBYTES) -> SUCCESS_FLAG		     [procedure]
		Applies the  lock operation  LOCK_OP to  the file  described  by
		DEVICE. NBYTES specifies the number  of bytes after the  current
		file pointer to lock; if 0,  the entire file is locked.  Returns
		<true> if the lock operation was succesful, <false> otherwise.

		DEVICE must be writeable, and have been opened in 'write' or
		'read/write' mode.

		LOCK_OP may be one of the following values:

		Integer		Macro		Function
			0		F_ULOCK		Unlock a previously locked section
			1		F_LOCK		Lock a section for exclusive use
			2		F_TLOCK		Test and lock a section (non-blocking)
			3  		F_TEST		Test section for other process' locks


syslock(DEVICE, WAIT) -> LOCKED
		Attempts to lock the file described by DEVICE. If WAIT is  true,
		will wait if necessary till the file is free. Returns <true>  if
		file was succesfully locked, <false> otherwise.

sysunlock(DEVICE) -> UNLOCKED
		Attempts to  unlock  the  file described  by  DEVICE,  returning
		<true> if succesful, <false> otherwise.


--- $poplocal/local/help/lockf
--- Copyright University of Sussex 1989. All rights reserved. ----------
