advisory-file-lock · shipping · also advisory locking

Advisory file lock

An advisory file lock coordinates access among cooperating participants without itself preventing access that bypasses the locking protocol.

Related Observatory article: Advisory file lock on hesela.com

On local Linux filesystems, flock() locks follow open file descriptions; a replacement pathname can refer to a different file. Hesela's ordered subprocess observation acquires a second lock after target replacement while the old file remains locked. Retaining a separate coordination file preserves the tested conflict; deleting and recreating it loses that shared identity. [1] [2]

Relations

related
open-file-description-lock, open-file-description, atomic-rename, unlink, process-associated-record-lock

Limitations

Citations

  1. Linux man-pages 6.19: flock(2), ownership and filesystem differences (accessed 2026-10-16)
  2. Hesela: local Linux lock-identity observation, source hash and limitations (accessed 2026-10-16)
  3. Hesela: A lock follows the opened file, not the replacement name (accessed 2026-10-16)

JSON: /data/terms/advisory-file-lock.json