F_OFD_GETLK

Open File Description locks

Usually record locks held by a process are released on *any* close and are not inherited across a fork().

These cmd values will set locks that conflict with process-associated record locks, but are "owned" by the open file description, not the process. This means that they are inherited across fork() like BSD (flock) locks, and they are only released automatically when the last reference to the open file against which they were acquired is put.

Values

ValueMeaning
F_OFD_GETLK36

Queries the system if the lock could be placed

F_OFD_SETLK37

Acquires or releases an open file description lock

F_OFD_SETLKW38

Same as F_OFD_SETLK, but waits if a conflicting lock is held on the file

Meta