Previous: posix fd trunc, Up: posix fd [Index]
Interface to the C function lockf()
, (*manpages*)lockf.
Apply, test or remove a POSIX lock on a section of an open file; if
successful return unspecified values, else raise an exception
The file is selected by the file descriptor fd. The action by the signed integer cmd. The file section is from the current position up to len bytes.
cmd must be one of the constants: F_LOCK
, F_TLOCK
,
F_ULOCK
, F_TEST
.