ID EN
OS

lockf

Python 3.11

Apply, test or remove a POSIX lock on an open file descriptor. fd is an open file descriptor. cmd specifies the command to use - one of F_LOCK, F_TLOCK, F_ULOCK or F_TEST. len specifies the section of the file to lock.

Syntax

PYTHON
os.lockf(fd, cmd, len, /)

See Also

F_LOCK F_TLOCK F_ULOCK F_TEST auditing event Availability