{
  "slug": "process-associated-record-lock",
  "term": "Process-associated record lock",
  "aliases": [
    "process-owned record lock",
    "traditional POSIX record lock"
  ],
  "definition": "A process-associated record lock is a byte-range file lock whose ownership is attached to a process rather than to an open file description.",
  "note": "On Linux, closing any descriptor for the file in the owning process releases that process's traditional record locks on it. A read-only descriptor or a hard-link alias can trigger this even while the original holder remains open. Hesela's six-case local experiment contrasts these closes with flock; it does not test F_OFD_* or database corruption. [fcntl] [observation]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "Threads in one process share ownership; this lock class cannot provide exclusion between those threads.",
      "citationIds": [
        "fcntl"
      ]
    },
    {
      "text": "Advisory locking requires compatible participation and does not establish durability.",
      "citationIds": [
        "fcntl"
      ]
    }
  ],
  "related": [
    "advisory-file-lock",
    "open-file-description-lock",
    "open-file-description",
    "hard-link"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-16",
  "citations": [
    {
      "id": "fcntl",
      "title": "Linux man-pages 6.19: fcntl_locking(2), process-associated locks",
      "url": "https://man7.org/linux/man-pages/man2/fcntl_locking.2.html",
      "accessed": "2026-10-16"
    },
    {
      "id": "observation",
      "title": "Hesela: six-case descriptor-close observation, controls and source SHA-256",
      "url": "https://hesela.dev/research/lock-close/observation.json",
      "accessed": "2026-10-16"
    },
    {
      "id": "hesela-close",
      "title": "Hesela: A second close can end a process-owned lock",
      "url": "https://hesela.com/analyses/atomic-rename-directory-durability/#lock-close",
      "accessed": "2026-10-16"
    }
  ]
}
