Apply, test or remove a POSIX lock on an open file descriptor. fd An open file descriptor. command One of F_LOCK, F_TLOCK, F_ULOCK or F_TEST. length The number of bytes to lock, starting at the current position.
os/lockf
lockf