Tagged articles
2 articles
Page 1 of 1
ITPUB
ITPUB
Oct 19, 2016 · Fundamentals

Understanding the Differences Between flock, lockf, and fcntl for Linux File Locking

This article explains how the Linux file‑locking interfaces flock, lockf, and fcntl differ in scope, behavior, and interaction, providing detailed function prototypes, option tables, and multiple C code examples that illustrate locking across duplicated descriptors, forked processes, and exec calls.

fcntlfile lockingflock
0 likes · 14 min read
Understanding the Differences Between flock, lockf, and fcntl for Linux File Locking
MaGe Linux Operations
MaGe Linux Operations
Aug 12, 2016 · Operations

Mastering File Locks in Linux: flock vs lockf vs fcntl Explained

This article compares Linux file locking mechanisms—flock, lockf, and fcntl—detailing their prototypes, lock types, behavior with forks, dup, exec, and NFS, and provides practical code examples illustrating differences in lock scope, recursion, and interaction between advisory and POSIX locks.

LinuxSystem Programmingfcntl
0 likes · 13 min read
Mastering File Locks in Linux: flock vs lockf vs fcntl Explained