SYS$ENQ (OpenVMS) SYS$ENQ (OpenVMS)
NAME
fcntl - control open file descriptors
SYS$ENQ - Queue lock request
EXPLAINATION
The Digital UNIX fcntl system call provides functionality similar to
the OpenVMS SYS$ENQ system service in that it allows the calling func‐
tion to set a lock on a portion of a file. UNIX files are not con‐
structed of records so it is only possible to lock sequential sections
of a file. Locking can be effected by calling fcntl with the file
descriptor of the file to lock, a command of F_SETLK and a flock struc‐
ture indicating what section of the file to lock. If fcntl was unable
to obtain the lock an error is returned. However, no (callback) AST is
queued and the lock must be retried manually. The lockf function is a
front end to the fcntl system call.
RELATED INFORMATION
Digital UNIX Functions:
fcntl(2), open(2), lockf(3), semget(2) delim off
SYS$ENQ (OpenVMS)